Details
enum GdkColorspace
typedef enum {
GDK_COLORSPACE_RGB
} GdkColorspace; |
This enumeration defines the color spaces that are supported by
the gdk-pixbuf library. Currently only
RGB is supported.
struct GdkPixbuf
struct GdkPixbuf {
/* Reference count */
int ref_count;
/* Color space */
GdkColorspace colorspace;
/* Number of channels, alpha included */
int n_channels;
/* Bits per channel */
int bits_per_sample;
/* Size */
int width, height;
/* Offset between rows */
int rowstride;
/* The pixel array */
guchar *pixels;
/* Destroy notification function; it is supposed to free the pixel array */
GdkPixbufDestroyNotify destroy_fn;
/* User data for the destroy notification function */
gpointer destroy_fn_data;
/* Last unref handler, determines whether the pixbuf should be finalized */
GdkPixbufLastUnref last_unref_fn;
/* User data for the last unref handler */
gpointer last_unref_fn_data;
/* Do we have an alpha channel? */
guint has_alpha : 1;
}; |
This is the main structure in the
gdk-pixbuf library. It is used to
represent images. It contains information about the image's pixel
data, its color space, bits per sample, width and height, and the
rowstride or number of bytes between rows.
gdk_pixbuf_get_colorspace ()
Queries the color space of a pixbuf.
gdk_pixbuf_get_n_channels ()
int gdk_pixbuf_get_n_channels (const GdkPixbuf *pixbuf); |
Queries the number of channels of a pixbuf.
gdk_pixbuf_get_has_alpha ()
gboolean gdk_pixbuf_get_has_alpha (const GdkPixbuf *pixbuf); |
Queries whether a pixbuf has an alpha channel (opacity information).
gdk_pixbuf_get_bits_per_sample ()
int gdk_pixbuf_get_bits_per_sample (const GdkPixbuf *pixbuf); |
Queries the number of bits per color sample in a pixbuf.
gdk_pixbuf_get_pixels ()
guchar* gdk_pixbuf_get_pixels (const GdkPixbuf *pixbuf); |
Queries a pointer to the pixel data of a pixbuf.
gdk_pixbuf_get_width ()
int gdk_pixbuf_get_width (const GdkPixbuf *pixbuf); |
Queries the width of a pixbuf.
gdk_pixbuf_get_height ()
int gdk_pixbuf_get_height (const GdkPixbuf *pixbuf); |
Queries the height of a pixbuf.
gdk_pixbuf_get_rowstride ()
int gdk_pixbuf_get_rowstride (const GdkPixbuf *pixbuf); |
Queries the rowstride of a pixbuf, which is the number of bytes between rows.