Function

Gimpcairo_surface_create_buffer

deprecated: 3.2 since: 2.10

Declaration [src]

GeglBuffer*
gimp_cairo_surface_create_buffer (
  cairo_surface_t* surface,
  const Babl* format
)

Description [src]

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

If format is set, the returned GeglBuffer will use it. It has to map with surface Cairo format. If unset, the buffer format will be determined from surface. The main difference is that automatically determined format has sRGB space and TRC by default.

Available since: 2.10

Deprecated since: 3.2

Use gimp_cairo_surface_get_buffer().

Parameters

surface

Type: cairo_surface_t

A Cairo surface.

The data is owned by the caller of the function.
format

Type: Babl

A Babl format.

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.