GdkPixbuf



Hi,

I would like to manipulate pixel data in a GdkPixbuf (GTK/GDK/Gnome2.0). I believe that I can get the start of the array of pixels with gdk_pixbuf_get_pixels()

Is this simply an RGB array? If so, how is the information arranged - is each successive guchar r, g, b values for each pixel? Is it a 1D array or a 2D array?

Also, how are alpha channels handled? gdk_pixbuf_get_has_alpha() will obviously tell me whether there is an alpha channel or not, but where is the data for that channel stored?

Finally, is there a recommended way of setting the colour and transparency of a specific pixel in a gdkpixbuf. Do I have to reference the array elements directly, or are there helper functions that I have not found yet?

I cannot find a tutorial for these aspects of GdkPixbuf usage, so any code snippets that illustrate this would be really useful.

Your help is most appreciated,
Best regards,

Chris.

_________________________________________________________________
Get faster connections -- switch to MSN Internet Access! http://resourcecenter.msn.com/access/plans/default.asp




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]