Package: gdk

Function gdk:texture-downloader-download-bytes

Lambda List

gdk:texture-downloader-download-bytes (downloader)

Arguments

downloader -- a gdk:texture-downloader instance
stride -- an unsigned integer with the stride of the resulting data in bytes

Return Value

The g:bytes instance with the downloaded pixels.

Details

Downloads the given texture pixels into a g:bytes instance. The rowstride will be stored in the stride value.

This function will abort if it tries to download a large texture and fails to allocate memory. If you think that may happen, you should handle memory allocation yourself and use the gdk:texture-downloader-download-into function once allocation succeeded.

Since 4.10
 

See also

#2024-12-2