### Function

# Gimp cairo_surface_create_buffer

since: 2.10

#### Declaration [src]

    GeglBuffer*
    gimp_cairo_surface_create_buffer (
      cairo_surface_t* surface
    )

#### Description [src]

This function returns a `GeglBuffer` which wraps `surface`‘s pixels. It must only be called on image surfaces, calling it on other surface types is an error.

Available since: 2.10

#### Parameters

`surface`

  Type: `cairo_surface_t`

  A Cairo surface.

  The data is owned by the caller of the function.

#### Return value

Type: `GeglBuffer`

A `GeglBuffer`.

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