Package: cairo

Function cairo:image-surface-create-from-png

Lambda List

cairo:image-surface-create-from-png (path)

Arguments

path -- a namestring or pathname for the path of the PNG file to load

Return Value

The new cairo:surface-t instance initialized with the contents of the PNG file, or a "nil" surface if any error occurred.

Details

Creates a new image surface and initializes the contents to the given PNG file. A "nil" surface can be checked for with the cairo:surface-status function which may return one of the following values: :no-memory, :file-not-found, or :read-error. Alternatively, you can allow errors to propagate through the drawing operations and check the status on the context upon completion using the cairo:status function.
 

See also

2025-1-13