Package: gdk

Function gdk:texture-new-from-filename

Lambda List

gdk:texture-new-from-filename (path)

Arguments

path -- a pathname or namestring for the file to load, the value is a file system path, using the OS encoding

Return Value

The newly created gdk:texture object.

Details

Creates a new texture by loading an image from a file. The file format is detected automatically. The supported formats are PNG and JPEG, 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

2025-2-8