Package: gtk

Function gtk:image-new-from-file

Lambda List

gtk:image-new-from-file (path)

Arguments

path -- a pathname or namestring with the name of the file

Return Value

The new gtk:image widget.

Details

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

If the file contains an animation, the image will contain an animation.

If you need to detect failures to load the file, use the gdk-pixbuf:pixbuf-new-from-file 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-file 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

2023-3-20