[Gtk-sharp-list] Current way of creating a Pixbuf from an RGB Array

egrath Egon.Rath at gmail.com
Fri Aug 8 05:54:22 EDT 2008


If this has been fixed in February i assume that it's already in the 2.0
Preview Source release on 1st August 2008 ;-)

I am using the following Mono and GTK# Versions:

Mono 2.0 Preview 1
GTK# 2.12

Currently i am unable to use the SVN version because i can't access the Repo
from within the company, but will try it out when at home. Attanded you will
find a demo source which throws the Exception when creating the Pixbuf from
the Array.

Egon
http://www.nabble.com/file/p18889033/V4L2_Test.tar.bz2 V4L2_Test.tar.bz2 

Christian Hoff wrote:
> 
> You will probably have to update your mono installation or use SVN. As 
> Zolton Varga stated in the bug, this has been fixed in February. I have 
> tested it out(using Gtk# and Mono SVN versions) and it works fine :-)
> 
> Christian
>> Hello,
>>
>> can someone please tell me what's the current way of getting a Gdk.Pixbuf
>> from an byte[] full of RGB Values? I know that there is an overload of
>> the
>> Gdk.Pixbuf constructor which would normally accomplish this, but
>> according
>> to my tests and Bug ID 362951 it seems to be broken in 2.0 Preview.
>>
>> I use the following statement:
>>
>> Gdk.Pixbuf picture = new Gdk.Pixbuf( m_RawData, Gdk.Colorspace.Rgb,
>> false,
>> 8, m_RawResolution.Width, m_RawResolution.Height, m_RawResolution.Width *
>> 3,
>> null );
>>
>> and get the following exception:
>>
>> Unhandled Exception: System.InvalidProgramException: Invalid IL code in
>> (wrapper
>>  native-to-managed) GdkSharp.PixbufDestroyNotifyWrapper:NativeCallback
>> (intptr,i
>> ntptr): IL_0030: call      0x00000006
>>
>> Any ideas?
>>
>> Thanks,
>> Egon
>>
>>   
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Current-way-of-creating-a-Pixbuf-from-an-RGB-Array-tp18856992p18889033.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.



More information about the Gtk-sharp-list mailing list