Package: gtk

Function gtk:image-new-from-resource

Lambda List

gtk:image-new-from-resource (resource)

Arguments

resource -- a string with a resource path

Return Value

The new gtk:image widget.

Details

Creates an image displaying the resource file in resource. This function always returns a valid gtk:image widget. If the file is not found or can not be loaded, the resulting gtk:image widget will display a "broken image" icon.

If you need to detect failures to load the file, use the gdk-pixbuf:pixbuf-new-from-resource function to load the file yourself, then create the gtk:image widget from the pixbuf, or for animations, use the gdk-pixbuf:pixbuf-animation-new-from-resource function.

The storage type, see the gtk:image-storage-type function, of the returned image is not defined, it will be whatever is appropriate for displaying the file.
 

See also

2024-10-29