from_file


Description:

[ CCode ( cname = "gdk_texture_new_from_file" ) ]
public static Texture from_file (File file) 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.

Parameters:

file

`GFile` to load

Returns:

A newly-created `GdkTexture` or null if an error occurred.