Clutter.Image.set_bytes

### Method

# Clutter Imageset_bytes

#### Declaration [src]

    gboolean
    clutter_image_set_bytes (
      ClutterImage* image,
      GBytes* data,
      CoglPixelFormat pixel_format,
      guint width,
      guint height,
      guint row_stride,
      GError** error
    )

#### Description [src]

Sets the image data stored inside a `GBytes` to be displayed by `image`.

If the image data was successfully loaded, the `image` will be invalidated.

In case of error, the `error` value will be set, and this function will return `FALSE`.

The image data contained inside the `GBytes` is copied in texture memory, and no additional reference is acquired on the `data`.

#### Parameters

`data` | `GBytes`
| The image data, as a `GBytes`.
| The data is owned by the caller of the function.
`pixel_format` | `CoglPixelFormat`
| The Cogl pixel format of the image data.
`width` | `guint`
| The width of the image data.
`height` | `guint`
| The height of the image data.
`row_stride` | `guint`
| The length of each row inside `data`.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `gboolean`
| `TRUE` if the image data was successfully loaded, and `FALSE` otherwise.