Warning: cairo_surface_create_buffer is deprecated since 3.0.8.
This function returns a Buffer 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 [class@Gegl.Buffer] 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.
| surface |
a Cairo surface |
| format |
a Babl format. |
|
a Buffer |