set_from_file


Description:

[ Version ( deprecated = true , deprecated_since = "1.12" , since = "0.8" ) ]
public bool set_from_file (string filename) throws Error

Warning: set_from_file is deprecated since 1.12.

Sets the Texture image data from an image file.

Note:

Use Image and platform-specific image loading API, like GdkPixbuf, instead

In case of failure, false is returned and error is set.

If load_async is set to true, this function will return as soon as possible, and the actual image loading from disk will be performed asynchronously. size_change will be emitten when the size of the texture is available and load_finished will be emitted when the image has been loaded or if an error occurred.

Parameters:

this

A Texture

filename

The filename of the image in GLib file name encoding

Returns:

true if the image was successfully loaded and set




2022 vala-language.org