Constructor
GdkPixbufPixbufnew
Declaration [src]
GdkPixbuf*
gdk_pixbuf_new (
GdkColorspace colorspace,
gboolean has_alpha,
int bits_per_sample,
int width,
int height
)
Description [src]
Creates a new GdkPixbuf
structure and allocates a buffer for it.
If the allocation of the buffer failed, this function will return NULL
.
The buffer has an optimal rowstride. Note that the buffer is not cleared; you will have to fill it completely yourself.
Parameters
colorspace
-
Type:
GdkColorspace
Color space for image.
has_alpha
-
Type:
gboolean
Whether the image should have transparency information.
bits_per_sample
-
Type:
int
Number of bits per color sample.
width
-
Type:
int
Width of image in pixels, must be > 0.
height
-
Type:
int
Height of image in pixels, must be > 0.
Return value
Type: GdkPixbuf
A newly-created pixel buffer.
The caller of the function takes ownership of the data, and is responsible for freeing it. |
The return value can be NULL . |