gdk_pixbuf questions



Hello,

I have a question about gdk_pixbuf: in which order are the
RGBA values organised in memory?  Do I need to care about the
byte order of the machine?

The specific questions are:
(1) What is a portable way to access the alpha values of a pixbuf?
Does something like

    pixels = gdk_pixbuf_get_pixels(pixbuf);
    alpha = pixels [ 4*(y*width + x) + 3 ];

always work, or does this depend on the byte order?

(2) How can I portably construct the 'pixel' argument for
'gdk_pixbuf_fill'?  Does 0x000000FF always denote opaque black, or is
it transparent blue on some systems?

Slightly confused,
Jochen


PS.: I noticed that a lot of GNOME 2 library manual appeard at
http://developer.gnome.org/doc/API/.  Whoever installed them there,
thank you :-)
-- 
                                         Omm
                                      (0)-(0)
http://www.mathematik.uni-kl.de/~wwwstoch/voss/index.html

Attachment: pgpRMH0QQAT8O.pgp
Description: PGP signature



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