Pixbuf.newFromBytes
gdkpixbuf.pixbuf.Pixbuf newFromBytes(glib.bytes.Bytes data, gdkpixbuf.types.Colorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height, int rowstride)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 [glib.bytes.Bytes] variant of [gdkpixbuf.pixbuf.Pixbuf.newFromData], useful for language bindings.
Parameters
data | Image data in 8-bit/sample packed format inside a #GBytes |
colorspace | Colorspace for the image data |
hasAlpha | Whether the data has an opacity channel |
bitsPerSample | Number of bits per sample |
width | Width of the image in pixels, must be > 0 |
height | Height of the image in pixels, must be > 0 |
rowstride | Distance in bytes between row starts |
Returns
A newly-created pixbuf