tiff Module
Overview
The tiff
module provides measures to read/write image data in TIFF format. To utilize it, import the tiff
module using import
function.
Below is an example to read a TIFF file:
import(tiff)
img = image('foo.tiff')
Exntension to Function's Capability
This module extends the capability of function image()
and instance method image#write()
so that they can read/write TIFF files.
When function image()
is provided with a stream that satisfies the following conditions, it would recognize the stream as a TIFF file.
- The identifier of the stream ends with a suffix "
.tif
" or ".tiff
".
When instance method image#write()
is provided with a stream that satisfies the following condition, it would write image data in TIFF format.
- The identifier of the stream ends with a suffix "
.tif
" or ".tiff
".
Extension to image Class
This module extends the image
class with methods described here.
image#read@tiff(stream:stream:r):reduce
Reads a TIFF image from a stream.
Thanks
This module uses libtiff which is distributed in the following site: