Package: gtk
Function gtk:image-new-from-file
Lambda Listgtk:image-new-from-file (path) ArgumentsReturn ValueThe 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