[ CCode ( cname = "gdk_texture_new_from_filename" ) ]
[ Version ( since = "4.6" ) ]
public static Texture from_filename (string path) throws Error
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.
If null is returned, then throws will be set.
This function is threadsafe, so that you can e.g. use GTask and [[email protected]_in_thread] to avoid blocking the main thread while loading a big image.
path |
the filename to load |
A newly-created `GdkTexture` |