reference count of 1, or null on error
pixbufGetFromSurface
fn
gdkpixbuf.pixbuf.Pixbuf pixbufGetFromSurface(cairo.surface.Surface surface, int srcX, int srcY, int width, int height)Transfers image data from a #cairo_surface_t and converts it to an RGB(A) representation inside a #GdkPixbuf. This allows you to efficiently read individual pixels from cairo surfaces. For #GdkWindows, use [gdk.global.pixbufGetFromWindow] instead.
This function will create an RGB pixbuf with 8 bits per channel. The pixbuf will contain an alpha channel if the surface contains one.
Parameters
surface | surface to copy from |
srcX | Source X coordinate within surface |
srcY | Source Y coordinate within surface |
width | Width in pixels of region to get |
height | Height in pixels of region to get |
Returns
A newly-created pixbuf with a