png module provides measures to read/write image data in PNG format. To utilize it, import the
png module using
Below is an example to read a PNG file:
import(png) img = image('foo.png')
This module extends the capability of function
image() and instance method
image#write() so that they can read/write PNG files.
image() is provided with a stream that satisfies the following conditions, it would recognize the stream as a PNG file.
When instance method
image#write() is provided with a stream that satisfies the following condition, it would write image data in PNG format.
This module extends the
image class with methods described here.
This module uses libpng library which is distributed in the following site: