Hello,

I've got an unmanaged C code that returns a pointer to a guchar memory
containing RGB data. I'd like to use this data to create a pixbuf via:

public Pixbuf (byte[] data, Colorspace colorspace, bool has_alpha,
               int bits_per_sample, int width, int height,
               int rowstride, PixbufDestroyNotify destroy_fn)

Now, what's the right way to marshal a guchar array to a byte[] thing? I
tried a simple:

[DllImport ("Gdv")]
private static extern byte[] gdv_framerunner_get_frame (...);

...that kind of works, though there seems to be some garbage at the
begining of the byte[] (not suprising). 

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

Thanks in advance, 


-- 
MichaƂ Dominik K.
[EMAIL PROTECTED]
www.mdk.org.pl
        


 
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to