### Constructor

# Gtk Imagenew_from_pixbuf

deprecated: 4.12

#### Declaration [src]

    GtkWidget*
    gtk_image_new_from_pixbuf (
      GdkPixbuf* pixbuf
    )

#### Description [src]

Creates a new `GtkImage` displaying `pixbuf`.

The `GtkImage` does not assume a reference to the pixbuf; you still need to unref it if you own references. `GtkImage` will add its own reference rather than adopting yours.

This is a helper for `gtk_image_new_from_paintable()`, and you can’t get back the exact pixbuf once this is called, only a texture.

Note that this function just creates an `GtkImage` from the pixbuf. The `GtkImage` created will not react to state changes. Should you want that, you should use `gtk_image_new_from_icon_name()`.

Deprecated since: 4.12

Use `gtk_image_new_from_paintable()` and `gdk_texture_new_for_pixbuf()` instead.

#### Parameters

`pixbuf`

  Type: `GdkPixbuf`

  A `GdkPixbuf`

  The argument can be `NULL`.
  The data is owned by the caller of the function.

#### Return value

Type: `GtkWidget`

A new `GtkImage`

The data is owned by the called function.