Name
csurface:WriteToPNG -- write surface to PNG image
Synopsis
status = csurface:WriteToPNG(filename$)
Function
Writes the contents of the surface to a new file specified by filename$ as a PNG image

This function returns #CAIRO_STATUS_SUCCESS if the PNG file was written successfully. Otherwise, #CAIRO_STATUS_NO_MEMORY if memory could not be allocated for the operation or #CAIRO_STATUS_SURFACE_TYPE_MISMATCH if the surface does not have pixel contents, or #CAIRO_STATUS_WRITE_ERROR if an I/O error occurs while attempting to write the file, or #CAIRO_STATUS_PNG_ERROR if libpng returned an error.

Inputs
filename$
filename of the PNG image
Results
status
a Cairo status value (see above)

Show TOC