Texture.newFromBytes
gdk.texture.Texture newFromBytes(glib.bytes.Bytes bytes)Creates a new texture by loading an image from memory,
The file format is detected automatically. The supported formats are PNG, JPEG and TIFF, though more formats might be available.
If null is returned, then error will be set.
This function is threadsafe, so that you can e.g. use GTask and [gio.task.Task.runInThread] to avoid blocking the main thread while loading a big image.
Parameters
bytes | a [glib.bytes.Bytes] containing the data to load |
Returns
A newly-created [gdk.texture.Texture]
Throws
[ErrorWrap]