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

dataImage data in 8-bit/sample packed format inside a #GBytes
colorspaceColorspace for the image data
hasAlphaWhether the data has an opacity channel
bitsPerSampleNumber of bits per sample
widthWidth of the image in pixels, must be > 0
heightHeight of the image in pixels, must be > 0
rowstrideDistance in bytes between row starts

Returns

A newly-created pixbuf