The GdkPixbuf Structure

Name

The GdkPixbuf Structure -- Information that describes an image.

Synopsis


#include <gdk-pixbuf/gdk-pixbuf.h>


struct      GdkPixbuf;
ArtPixFormat gdk_pixbuf_get_format          (GdkPixbuf *pixbuf);
int         gdk_pixbuf_get_n_channels       (GdkPixbuf *pixbuf);
int         gdk_pixbuf_get_has_alpha        (GdkPixbuf *pixbuf);
int         gdk_pixbuf_get_bits_per_sample  (GdkPixbuf *pixbuf);
guchar*     gdk_pixbuf_get_pixels           (GdkPixbuf *pixbuf);
int         gdk_pixbuf_get_width            (GdkPixbuf *pixbuf);
int         gdk_pixbuf_get_height           (GdkPixbuf *pixbuf);
int         gdk_pixbuf_get_rowstride        (GdkPixbuf *pixbuf);

Description

The GdkPixbuf structure contains information that describes an image in memory. It is actually a simple wrapper that adds reference counting capabilities to an ArtPixBuf structure.

Details

struct GdkPixbuf

struct GdkPixbuf {
	/* Reference count */
	int ref_count;

	/* Libart pixbuf */
	ArtPixBuf *art_pixbuf;
};

This is the main structure in the GdkPixbuf library. This structure adds reference counting capabilities to an ArtPixBuf structure.

int ref_countReference count.
ArtPixBuf *art_pixbufAn ArtPixBuf that actually contains the description of the image data.


gdk_pixbuf_get_format ()

ArtPixFormat gdk_pixbuf_get_format          (GdkPixbuf *pixbuf);

Queries the image format (color model) of a pixbuf.

pixbuf : A pixbuf.
Returns : Image format.


gdk_pixbuf_get_n_channels ()

int         gdk_pixbuf_get_n_channels       (GdkPixbuf *pixbuf);

Queries the number of channels of a pixbuf.

pixbuf : A pixbuf.
Returns : Number of channels.


gdk_pixbuf_get_has_alpha ()

int         gdk_pixbuf_get_has_alpha        (GdkPixbuf *pixbuf);

Queries whether a pixbuf has an alpha channel (opacity information).

pixbuf : A pixbuf.
Returns : TRUE if it has an alpha channel, FALSE otherwise.


gdk_pixbuf_get_bits_per_sample ()

int         gdk_pixbuf_get_bits_per_sample  (GdkPixbuf *pixbuf);

Queries the number of bits per color sample in a pixbuf.

pixbuf : A pixbuf.
Returns : Number of bits per color sample.


gdk_pixbuf_get_pixels ()

guchar*     gdk_pixbuf_get_pixels           (GdkPixbuf *pixbuf);

Queries a pointer to the pixel data of a pixbuf.

pixbuf : A pixbuf.
Returns : A pointer to the pixbuf's pixel data.


gdk_pixbuf_get_width ()

int         gdk_pixbuf_get_width            (GdkPixbuf *pixbuf);

Queries the width of a pixbuf.

pixbuf : A pixbuf.
Returns : Width in pixels.


gdk_pixbuf_get_height ()

int         gdk_pixbuf_get_height           (GdkPixbuf *pixbuf);

Queries the height of a pixbuf.

pixbuf : A pixbuf.
Returns : Height in pixels.


gdk_pixbuf_get_rowstride ()

int         gdk_pixbuf_get_rowstride        (GdkPixbuf *pixbuf);

Queries the rowstride of a pixbuf, or the number of bytes between rows.

pixbuf : A pixbuf.
Returns : Number of bytes between rows.

See Also

ArtPixBuf