Pixbuf.newFromBytes

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 glib.bytes.Bytes

Image data in 8-bit/sample packed format inside a #GBytes

colorspace gdkpixbuf.types.Colorspace

Colorspace for the image data

hasAlpha bool

Whether the data has an opacity channel

bitsPerSample 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

Type: gdkpixbuf.pixbuf.Pixbuf

A newly-created pixbuf