Function
Gimpcairo_surface_create_buffer
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 surface
‘s 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
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. |