Gtk.Image.new_from_pixbuf

function new_from_pixbuf(pixbuf:GdkPixbuf.Pixbuf):Gtk.Widget {
    // Gjs wrapper for gtk_image_new_from_pixbuf()
}

Creates a new Gtk.Image displaying pixbuf. The Gtk.Image does not assume a reference to the pixbuf; you still need to unref it if you own references. Gtk.Image will add its own reference rather than adopting yours.

Note that this function just creates an Gtk.Image from the pixbuf. The Gtk.Image created will not react to state changes. Should you want that, you should use Gtk.Image.new_from_icon_set.

pixbuf

a GdkPixbuf.Pixbuf, or null

Returns

a new Gtk.Image