Image.this

Creates a new gtk.Image displaying the file filename. If the file isn’t found or can’t be loaded, the resulting gtk.Image will display a “broken image” icon. This function never returns NULL, 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 Pixbuf.newFromFile to load the file yourself, then create the gtk.Image from the pixbuf. (Or for animations, use Pixbuf.animationNewFromFile).

The storage type (Image.getStorageType) of the returned image is not defined, it will be whatever is appropriate for displaying the file.

Parameters

filename string

a filename

Return Value

a new gtk.Image

Throws

ConstructionException GTK+ fails to create the object.