### Constructor

# Gdk MemoryTexture new

#### Declaration [src]

    GdkTexture*
    gdk_memory_texture_new (
      int width,
      int height,
      GdkMemoryFormat format,
      GBytes* bytes,
      gsize stride
    )

#### Description [src]

Creates a new texture for a blob of image data.

The `GBytes` must contain `stride` × `height` pixels in the given format.

#### Parameters

`width`

  Type: `int`

  The width of the texture.

`height`

  Type: `int`

  The height of the texture.

`format`

  Type: `GdkMemoryFormat`

  The format of the data.

`bytes`

  Type: `GBytes`

  The `GBytes` containing the pixel data.

  The data is owned by the caller of the function.

`stride`

  Type: `gsize`

  Rowstride for the data.

#### Return value

Type: `GdkMemoryTexture`

A newly-created `GdkTexture`

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