ImageSurface.createFromPng

Creates a new image surface and initializes the contents to the given PNG file. Since 1.0

class ImageSurface
static
createFromPng
(
string filename
)

Parameters

filename string

name of PNG file to load

Return Value

a new cairo_surface_t initialized with the contents of the PNG file, or a "nil" surface if any error occurred. A nil surface can be checked for with cairo_surface_status(surface) which

Meta