[Gtk-sharp-list] Pixel Access

Alexandre Petitjean alexandre.petitjean at quidd.com
Mon Sep 24 11:36:19 EDT 2007

Hello list,

I want to create an image from numeric values.
I have a 2d array with values between 0 and 65535.
>From those values I want to create an 16bits grayscale pictures.

So I start with that line :
Gdk.Image gdi = new Gdk.Image(Gdk.ImageType.Normal,
Gdk.Visual.GetBestWithType(Gdk.VisualType.Grayscale), 512, 512);

but when I execute it returns the following error : 
(gtktif:16081): Gdk-CRITICAL **: gdk_visual_get_screen: assertion
`GDK_IS_VISUAL (visual)' failed

(gtktif:16081): Gdk-CRITICAL **: _gdk_image_new_for_depth: assertion
`visual || depth != -1' failed

How can I do ?


More information about the Gtk-sharp-list mailing list