Cogl.Bitmap.new_from_buffer
Description: Reference for Cogl.Bitmap.new_from_buffer

### Constructor

# Cogl Bitmapnew_from_buffer

#### Declaration [src]

    CoglBitmap*
    cogl_bitmap_new_from_buffer (
      CoglBuffer* buffer,
      CoglPixelFormat format,
      int width,
      int height,
      int rowstride,
      int offset
    )

#### Description [src]

Wraps some image data that has been uploaded into a `CoglBuffer` as a `CoglBitmap`. The data is not copied in this process.

Stability: | Unstable
Available since: | 1.8
This constructor is not directly available to language bindings

#### Parameters

`buffer` | `CoglBuffer*`
| A `CoglBuffer` containing image data.
| The data is owned by the caller of the function.
`format` | `CoglPixelFormat`
| The `CoglPixelFormat` defining the format of the image data in the given `buffer`.
`width` | `int`
| The width of the image data in the given `buffer`.
`height` | `int`
| The height of the image data in the given `buffer`.
`rowstride` | `int`
| The rowstride in bytes of the image data in the given `buffer`.
`offset` | `int`
| The offset into the given `buffer` to the first pixel that should be considered part of the `CoglBitmap`.

#### Return value

Returns: | `CoglBitmap`
| A `CoglBitmap` encapsulating the given `buffer`.
| The caller of the function takes ownership of the data, and is responsible for freeing it.