Package: gdk

Function gdk:texture-new-from-bytes

Lambda List

gdk:texture-new-from-bytes (bytes)

Arguments

bytes -- a g:bytes instance containing data to load

Return Value

The newly created gdk:texture object.

Details

Creates a new texture by loading an image from a memory. The file format is detected automatically. The supported formats are PNG, JPEG, and TIFF, though more formats might be available.

This function is threadsafe, so that you can, for example, use the g:task object and the g:task-run-in-thread function to avoid blocking the main thread while loading a big image.

Since 4.6
 

See also

#2024-11-21