Using The TIFF Library

libtiff is a set of C functions (a library) that support the manipulation of TIFF image files. The library requires an ANSI C compilation environment for building and presumes an ANSI C environment for use.


libtiff provides interfaces to image data at several layers of abstraction (and cost). At the highest level image data can be read into an 8-bit/sample, ABGR pixel raster format without regard for the underlying data organization, colorspace, or compression scheme. Below this high-level interface the library provides scanline-, strip-, and tile-oriented interfaces that return data decompressed but otherwise untransformed. These interfaces require that the application first identify the organization of stored data and select either a strip-based or tile-based API for manipulating data. At the lowest level the library provides access to the raw uncompressed strips or tiles, returning the data exactly as it appears in the file.

The material presented in this chapter is a basic introduction to the capabilities of the library; it is not an attempt to describe everything a developer needs to know about the library or about TIFF. Detailed information on the interfaces to the library are given in the UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNIX manual pages that accompany this software.

Michael Still has also written a useful introduction to libtiff for the IBM DeveloperWorks site available at UNI