[Gtk-sharp-list] Marshaling a byte[] for a pixbuf

Miguel de Icaza miguel at ximian.com
Wed Jul 13 11:13:59 EDT 2005


> Other possible solutions (creating a pixbuf at the unmananged side?) are
> greatly appreciated. 

You could create the Pixbuf on the unmanaged side, and use the raw
constructor: 'Pixbuf (IntPtr raw)'

When transferring data from managed to unmanaged code, you want to avoid
using the marshaller (specially with large images which is what you are
going to be dealing with).

So any other mechanism like passing a pointer to the data is preferred
over passing the actual data.


More information about the Gtk-sharp-list mailing list