### Constructor

# Gdk Texture new_for_pixbuf

#### Declaration [src]

    GdkTexture*
    gdk_texture_new_for_pixbuf (
      GdkPixbuf* pixbuf
    )

#### Description [src]

Creates a new texture object representing the `GdkPixbuf`.

This function is threadsafe, so that you can e.g. use GTask and `g_task_run_in_thread()` to avoid blocking the main thread while loading a big image.

#### Parameters

`pixbuf`

  Type: `GdkPixbuf`

  A `GdkPixbuf`

  The data is owned by the caller of the function.

#### Return value

Type: `GdkTexture`

A new `GdkTexture`

The caller of the function takes ownership of the data, and is responsible for freeing it.