NAME

tiff.c - implements reading and writing tiff files, uses io layer.

SYNOPSIS

io_glue *ig = io_new_fd( fd );
i_img *im   = i_readtiff_wiol(ig, -1); // no limit on how much is read
// or 
io_glue *ig = io_new_fd( fd );
return_code = i_writetiff_wiol(im, ig); 

DESCRIPTION

tiff.c implements the basic functions to read and write tiff files. It uses the iolayer and needs either a seekable source or an entire memory mapped buffer.

FUNCTION REFERENCE

Some of these functions are internal.

comp_seek(h, o, w)

Compatability for 64 bit systems like latest freebsd (internal)

h - tiff handle, cast an io_glue object
o - offset
w - whence
comp_mmap(thandle_t, tdata_t*, toff_t*)

Dummy mmap stub.

This shouldn't ever be called but newer tifflibs want it anyway.

comp_munmap(thandle_t h, tdata_t p, toff_t off)

Dummy munmap stub.

This shouldn't ever be called but newer tifflibs want it anyway.

i_readtiff_wiol(ig, allow_incomplete, page)
i_readtiff_multi_wiol(ig, *count)

Reads multiple images from a TIFF.

i_writetiff_multi_wiol(ig, imgs, count, fine_mode)

Stores an image in the iolayer object.

ig - io_object that defines source to write to 
imgs,count - the images to write
i_writetiff_multi_wiol_faxable(ig, imgs, count, fine_mode)

Stores an image in the iolayer object.

ig - io_object that defines source to write to 
imgs,count - the images to write
fine_mode - select fine or normal mode fax images
i_writetiff_wiol(im, ig)

Stores an image in the iolayer object.

im - image object to write out
ig - io_object that defines source to write to 
i_writetiff_wiol_faxable(i_img *, io_glue *)

Stores an image in the iolayer object in faxable tiff format.

im - image object to write out
ig - io_object that defines source to write to 

Note, this may be rewritten to use to simply be a call to a lower-level function that gives more options for writing tiff at some point.

fallback_rgb_channels

Calculate the number of output channels when we fallback to the RGBA family of functions.

AUTHOR

Arnar M. Hrafnkelsson <addi@umich.edu>, Tony Cook <tonyc@cpan.org>

SEE ALSO

Imager(3)