module PNG: The PNG functions allow reading PNG images into image surfaces,
and writing any surface to a PNG file.
val create :
string -> Cairo.Surface.t
create filename creates a new image surface and initializes
the contents to the given PNG file.
val create_from_stream :
input:(string -> int -> unit) -> Cairo.Surface.t
Creates a new image surface from PNG data read incrementally
input function. The
input s l function receives a
s whose first
l bytes must be filled with PNG data.
Any exception raised by
input is considered as a read
val write :
Cairo.Surface.t -> string -> unit
write surface filename writes the contents of
surface to a
filename as a PNG image.
val write_to_stream :
Cairo.Surface.t -> output:(string -> unit) -> unit
Writes the image surface using the