auto ˆ 0ÂÁÀCˆl–Ü4ý(ÔÂXÔ%ÝÆY¸ÛJbÑ¿¿ „ ád__‡I|¥‰ÓMa–ßi~”ªj"Tâ� Á?pM©‹FÿÃ?÷ Modifying The TIFF Library

dave Modifying The TIFF Library

This chapter provides information about the internal structure of the library, how to control the configuration when building it, and how to add new support to the library. The following sections are found in this chapter:


Library Configuration

Information on compiling the library is given elsewhere in this documentation. This section describes the low-level mechanisms used to control the optional parts of the library that are configured at build time. Control is based on a collection of C defines that are specified either on the compiler command line or in a configuration file such as port.h (as generated by the configure script for UNIX systems) or tiffconf.h.

Configuration defines are split into three areas:

If the define COMPRESSION_SUPPORT is not defined then a default set of compression schemes is automatically configured:

To override the default compression behaviour define COMPRESSION_SUPPORT and then one or more additional defines to enable configuration of the appropriate codecs (see the table below); e.g.

#define	COMPRESSION_SUPPORT
#define	CCITT_SUPPORT
#define	PACKBITS_SUPPORT
Several other compression schemes are configured separately from the default set because they depend on ancillary software packages that are not distributed with libtiff.

Support for JPEG compression is controlled by JPEG_SUPPORT. The JPEG codec that comes with libtiff is designed for use with release 5 or later of the Independent JPEG Group's freely available software distribution. This software can be retrieved from the directory ftp.uu.net:/graphics/jpeg/.

NOTE: Enabling JPEG support automatically enables support for the TIFF 6.0 colorimetry and YCbCr-related tags.

Experimental support for the deflate algorithm is controlled by DEFLATE_SUPPORT. The deflate codec that comes with libtiff is designed for use with version 0.99 or later of the freely available libz library written by Jean-loup Gailly and Mark Adler. The data format used by this library is described in the files zlib-3.1.doc, and deflate-1.1.doc, available in the directory