Package: gdk-pixbuf

Function gdk-pixbuf:pixbuf-new

Lambda List

gdk-pixbuf:pixbuf-new (colorspace has-alpha bits-per-sample width height)

Arguments

colorspace -- a gdk-pixbuf:colorspace value for the image
has-alpha -- a boolean whether the image should have transparency information
bits-per-sample -- an integer for the number of bits per color sample
width -- an integer for the width of image in pixels, must be > 0
height -- an integer for the height of image in pixels, must be > 0

Return Value

The newly created gdk-pixbuf:pixbuf object, or nil if not enough memory could be allocated for the image buffer.

Details

Creates a new pixbuf and allocates a buffer for it. The buffer has an optimal rowstride. Note that the buffer is not cleared. You will have to fill it completely yourself.
 

See also

2026-09-17