Image.newFromPixbuf

gtk.image.Image newFromPixbuf(gdkpixbuf.pixbuf.Pixbuf pixbuf = null)

Creates a new [gtk.image.Image] displaying pixbuf.

The [gtk.image.Image] does not assume a reference to the pixbuf; you still need to unref it if you own references. [gtk.image.Image] will add its own reference rather than adopting yours.

This is a helper for [gtk.image.Image.newFromPaintable], and you can't get back the exact pixbuf once this is called, only a texture.

Note that this function just creates an [gtk.image.Image] from the pixbuf. The [gtk.image.Image] created will not react to state changes. Should you want that, you should use [gtk.image.Image.newFromIconName].

Parameters

pixbufa [gdkpixbuf.pixbuf.Pixbuf]

Returns

a new [gtk.image.Image]

Deprecated

Use [gtk.image.Image.newFromPaintable] and

[gdk.texture.Texture.newForPixbuf] instead