Picture.newForFile

gtk.picture.Picture newForFile(gio.file.File file = null)

Creates a new [gtk.picture.Picture] displaying the given file.

If the file isn’t found or can’t be loaded, the resulting [gtk.picture.Picture] is empty.

If you need to detect failures to load the file, use [gdk.texture.Texture.newFromFile] to load the file yourself, then create the [gtk.picture.Picture] from the texture.

Parameters

filea [gio.file.File]

Returns

a new [gtk.picture.Picture]