The question pretty much sums my question. I’ve a GtkDrawingArea and its surface (cairo_surface_t) has format CAIRO_FORMAT_INVALID (by default), i.e. “no such format exists or is supported” for that surface’s data.
Is there a way to create a copy of my GtkDrawingArea surface with any format I choose? Then I’d be able to query the data knowing its format.
Since the goal was to get the color pixel, the following worked for me:
Since the type of the drawing area is xlib (not image surface) it wasn’t necessary to create a copy of the latter type.