Constructor
GdkPixbuf.Pixbuf.new_from_bytes
Declaration [src]
GdkPixbuf*
gdk_pixbuf_new_from_bytes (
GBytes* data,
GdkColorspace colorspace,
gboolean has_alpha,
int bits_per_sample,
int width,
int height,
int rowstride
)
Description [src]
Creates a new GdkPixbuf
out of in-memory readonly image data.
Currently only RGB images with 8 bits per sample are supported.
This is the GBytes
variant of gdk_pixbuf_new_from_data()
, useful
for language bindings.
Parameters
data |
GBytes* |
Image data in 8-bit/sample packed format inside a |
|
Ownership is not transferred to the callee | |
colorspace |
GdkColorspace |
Colorspace for the image data |
|
has_alpha |
gboolean |
Whether the data has an opacity channel |
|
bits_per_sample |
int |
Number of bits per sample |
|
width |
int |
Width of the image in pixels, must be > 0 |
|
height |
int |
Height of the image in pixels, must be > 0 |
|
rowstride |
int |
Distance in bytes between row starts |
Return value
Returns: GdkPixbuf |
|
A newly-created pixbuf |
|
Ownership of the data is transferred to the caller |