roentgen b75cab
.\" $Id: libtiff.3tiff,v 1.4 2012-07-29 15:45:30 tgl Exp $
roentgen b75cab
.\"
roentgen b75cab
.\" Copyright (c) 1988-1997 Sam Leffler
roentgen b75cab
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
roentgen b75cab
.\"
roentgen b75cab
.\" Permission to use, copy, modify, distribute, and sell this software and 
roentgen b75cab
.\" its documentation for any purpose is hereby granted without fee, provided
roentgen b75cab
.\" that (i) the above copyright notices and this permission notice appear in
roentgen b75cab
.\" all copies of the software and related documentation, and (ii) the names of
roentgen b75cab
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
roentgen b75cab
.\" publicity relating to the software without the specific, prior written
roentgen b75cab
.\" permission of Sam Leffler and Silicon Graphics.
roentgen b75cab
.\" 
roentgen b75cab
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
roentgen b75cab
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
roentgen b75cab
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
roentgen b75cab
.\" 
roentgen b75cab
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
roentgen b75cab
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
roentgen b75cab
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
roentgen b75cab
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
roentgen b75cab
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
roentgen b75cab
.\" OF THIS SOFTWARE.
roentgen b75cab
.\"
roentgen b75cab
.if n .po 0
roentgen b75cab
.TH INTRO 3TIFF "November 2, 2005" "libtiff"
roentgen b75cab
.SH NAME
roentgen b75cab
libtiff \- introduction to
roentgen b75cab
.IR libtiff ,
roentgen b75cab
a library for reading and writing
roentgen b75cab
.SM TIFF
roentgen b75cab
files
roentgen b75cab
.SH SYNOPSIS
roentgen b75cab
.B "#include <tiffio.h>"</tiffio.h>
roentgen b75cab
.sp
roentgen b75cab
cc file.c
roentgen b75cab
.B -ltiff
roentgen b75cab
.SH DESCRIPTION
roentgen b75cab
.I libtiff
roentgen b75cab
is a library for reading and writing data files encoded with the
roentgen b75cab
.I "Tag Image File"
roentgen b75cab
format, Revision 6.0 (or revision 5.0 or revision 4.0). This file format is
roentgen b75cab
suitable for archiving multi-color and monochromatic image data.
roentgen b75cab
.PP
roentgen b75cab
The library supports several compression algorithms, as indicated by the
roentgen b75cab
.I Compression
roentgen b75cab
field, including:
roentgen b75cab
no compression (1),
roentgen b75cab
.SM CCITT
roentgen b75cab
1D Huffman compression (2),
roentgen b75cab
.SM CCITT
roentgen b75cab
Group 3 Facsimile compression (3),
roentgen b75cab
.SM CCITT
roentgen b75cab
Group 4 Facsimile compression (4),
roentgen b75cab
Lempel-Ziv & Welch compression (5),
roentgen b75cab
baseline JPEG compression (7),
roentgen b75cab
word-aligned 1D Huffman compression (32771),
roentgen b75cab
and
roentgen b75cab
PackBits compression (32773).
roentgen b75cab
In addition, several nonstandard compression algorithms are supported: the
roentgen b75cab
4-bit compression algorithm used by the
roentgen b75cab
.I ThunderScan
roentgen b75cab
program (32809) (decompression only), NeXT's 2-bit compression algorithm
roentgen b75cab
(32766) (decompression only), an experimental LZ-style algorithm known as
roentgen b75cab
Deflate (32946), and an experimental CIE LogLuv compression scheme designed
roentgen b75cab
for images with high dynamic range (32845 for LogL and 32845 for LogLuv).
roentgen b75cab
Directory information may be in either little- or big-endian byte order\-byte
roentgen b75cab
swapping is automatically done by the library. Data bit ordering may be either
roentgen b75cab
Most Significant Bit (\c
roentgen b75cab
.SM MSB\c
roentgen b75cab
) to Least Significant Bit (\c
roentgen b75cab
.SM LSB\c
roentgen b75cab
) or
roentgen b75cab
.SM LSB
roentgen b75cab
to
roentgen b75cab
.SM MSB.
roentgen b75cab
Finally, the library does not support files in which the
roentgen b75cab
.IR BitsPerSample ,
roentgen b75cab
.IR Compression ,
roentgen b75cab
.IR MinSampleValue ,
roentgen b75cab
or
roentgen b75cab
.IR MaxSampleValue
roentgen b75cab
fields are defined differently on a per-sample basis
roentgen b75cab
(in Rev. 6.0 the
roentgen b75cab
.I Compression
roentgen b75cab
tag is not defined on a per-sample basis, so this is immaterial).
roentgen b75cab
.SH "DATA TYPES"
roentgen b75cab
The library makes extensive use of C typedefs to promote portability.
roentgen b75cab
Two sets of typedefs are used, one for communication with clients
roentgen b75cab
of the library and one for internal data structures and parsing of the
roentgen b75cab
.SM TIFF
roentgen b75cab
format.
roentgen b75cab
The following typedefs are exposed to users either through function
roentgen b75cab
definitions or through parameters passed through the varargs interfaces.
roentgen b75cab
.in +.5i
roentgen b75cab
.sp 5p
roentgen b75cab
.ta +\w'typedef unsigned <\fIthing\fP> uint32;    'u
roentgen b75cab
.nf
roentgen b75cab
typedef unsigned short uint16;	16-bit unsigned integer
roentgen b75cab
typedef unsigned <\fIthing\fP> uint32;	32-bit unsigned integer
roentgen b75cab
.sp 5p
roentgen b75cab
typedef unsigned int ttag_t;	directory tag
roentgen b75cab
typedef uint16 tdir_t;	directory index
roentgen b75cab
typedef uint16 tsample_t;	sample number
roentgen b75cab
typedef uint32 tstrip_t;	strip number
roentgen b75cab
typedef uint32 ttile_t;	tile number
roentgen b75cab
typedef int32 tsize_t;	i/o size in bytes
roentgen b75cab
typedef void* tdata_t;	image data ref
roentgen b75cab
typedef void* thandle_t;	client data handle
roentgen b75cab
typedef int32 toff_t;	file offset
roentgen b75cab
.fi
roentgen b75cab
.sp 5p
roentgen b75cab
.in -.5i
roentgen b75cab
Note that
roentgen b75cab
.IR tstrip_t ,
roentgen b75cab
.IR ttile_t ,
roentgen b75cab
and
roentgen b75cab
.I tsize_t
roentgen b75cab
are constrained to be no more than 32-bit quantities by 32-bit fields they are
roentgen b75cab
stored in in the
roentgen b75cab
.SM TIFF
roentgen b75cab
image.
roentgen b75cab
Likewise
roentgen b75cab
.I tsample_t
roentgen b75cab
is limited by the 16-bit field used to store the
roentgen b75cab
.I SamplesPerPixel
roentgen b75cab
tag.
roentgen b75cab
.I tdir_t
roentgen b75cab
constrains the maximum number of
roentgen b75cab
.SM IFDs
roentgen b75cab
that may appear in an image and may be an arbitrary size (w/o penalty). 
roentgen b75cab
.I ttag_t
roentgen b75cab
must be either int, unsigned int, pointer, or double because the library uses
roentgen b75cab
a varargs interface and
roentgen b75cab
.SM "ANSI C"
roentgen b75cab
restricts the type of the parameter before an ellipsis to be a promoted type.
roentgen b75cab
.I toff_t
roentgen b75cab
is defined as int32 because TIFF file offsets are (unsigned) 32-bit
roentgen b75cab
quantities. A signed value is used because some interfaces return \-1 on
roentgen b75cab
error. Finally, note that user-specified data references are passed as opaque
roentgen b75cab
handles and only cast at the lowest layers where their type is presumed.
roentgen b75cab
.SH "LIST OF ROUTINES"
roentgen b75cab
The following routines are part of the library. Consult specific manual pages
roentgen b75cab
for details on their operation; on most systems doing ``man function-name''
roentgen b75cab
will work.
roentgen b75cab
.sp
roentgen b75cab
.nf
roentgen b75cab
.ta \w'TIFFCheckpointDirectory'u+2n
roentgen b75cab
\fIName\fP	\fIDescription\fP
roentgen b75cab
.sp 5p
roentgen b75cab
TIFFCheckpointDirectory	writes the current state of the directory
roentgen b75cab
TIFFCheckTile		very x,y,z,sample is within image
roentgen b75cab
TIFFCIELabToRGBInit	initialize CIE L*a*b* 1976 to RGB conversion state
roentgen b75cab
TIFFCIELabToXYZ		perform CIE L*a*b* 1976 to CIE XYZ conversion
roentgen b75cab
TIFFClientOpen		open a file for reading or writing
roentgen b75cab
TIFFClose		close an open file
roentgen b75cab
TIFFComputeStrip	return strip containing y,sample
roentgen b75cab
TIFFComputeTile		return tile containing x,y,z,sample
roentgen b75cab
TIFFCurrentDirectory	return index of current directory
roentgen b75cab
TIFFCurrentRow		return index of current scanline
roentgen b75cab
TIFFCurrentStrip	return index of current strip
roentgen b75cab
TIFFCurrentTile		return index of current tile
roentgen b75cab
TIFFDataWidth 		return the size of TIFF data types
roentgen b75cab
TIFFError		library error handler
roentgen b75cab
TIFFFdOpen		open a file for reading or writing
roentgen b75cab
TIFFFieldDataType	get data type from field information
roentgen b75cab
TIFFFieldName		get field name from field information
roentgen b75cab
TIFFFieldPassCount	get whether to pass a value count to Get/SetField
roentgen b75cab
TIFFFieldReadCount	get number of values to be read from field
roentgen b75cab
TIFFFieldTag		get tag value from field information
roentgen b75cab
TIFFFieldWithName	get field information given field name
roentgen b75cab
TIFFFieldWithTag	get field information given tag
roentgen b75cab
TIFFFieldWriteCount	get number of values to be written to field
roentgen b75cab
TIFFFileName		return name of open file
roentgen b75cab
TIFFFileno		return open file descriptor
roentgen b75cab
TIFFFindCODEC		find standard codec for the specific scheme
roentgen b75cab
TIFFFindField		get field information given tag and data type
roentgen b75cab
TIFFFlush		flush all pending writes
roentgen b75cab
TIFFFlushData		flush pending data writes
roentgen b75cab
TIFFGetBitRevTable	return bit reversal table
roentgen b75cab
TIFFGetField		return tag value in current directory
roentgen b75cab
TIFFGetFieldDefaulted	return tag value in current directory
roentgen b75cab
TIFFGetMode		return open file mode
roentgen b75cab
TIFFGetVersion		return library version string
roentgen b75cab
TIFFIsCODECConfigured	check, whether we have working codec
roentgen b75cab
TIFFIsMSB2LSB		return true if image data is being returned
roentgen b75cab
			with bit 0 as the most significant bit 
roentgen b75cab
TIFFIsTiled		return true if image data is tiled
roentgen b75cab
TIFFIsByteSwapped	return true if image data is byte-swapped
roentgen b75cab
TIFFNumberOfStrips	return number of strips in an image
roentgen b75cab
TIFFNumberOfTiles	return number of tiles in an image
roentgen b75cab
TIFFOpen		open a file for reading or writing
roentgen b75cab
TIFFPrintDirectory	print description of the current directory
roentgen b75cab
TIFFReadBufferSetup	specify i/o buffer for reading
roentgen b75cab
TIFFReadDirectory	read the next directory
roentgen b75cab
TIFFReadEncodedStrip	read and decode a strip of data
roentgen b75cab
TIFFReadEncodedTile	read and decode a tile of data
roentgen b75cab
TIFFReadRawStrip	read a raw strip of data
roentgen b75cab
TIFFReadRawTile		read a raw tile of data
roentgen b75cab
TIFFReadRGBAImage	read an image into a fixed format raster
roentgen b75cab
TIFFReadScanline	read and decode a row of data
roentgen b75cab
TIFFReadTile		read and decode a tile of data
roentgen b75cab
TIFFRegisterCODEC	override standard codec for the specific scheme
roentgen b75cab
TIFFReverseBits		reverse bits in an array of bytes
roentgen b75cab
TIFFRGBAImageBegin	setup decoder state for TIFFRGBAImageGet
roentgen b75cab
TIFFRGBAImageEnd	release TIFFRGBAImage decoder state
roentgen b75cab
TIFFRGBAImageGet	read and decode an image
roentgen b75cab
TIFFRGBAImageOK		is image readable by TIFFRGBAImageGet
roentgen b75cab
TIFFScanlineSize	return size of a scanline
roentgen b75cab
TIFFSetDirectory	set the current directory
roentgen b75cab
TIFFSetSubDirectory	set the current directory
roentgen b75cab
TIFFSetErrorHandler	set error handler function
roentgen b75cab
TIFFSetField		set a tag's value in the current directory
roentgen b75cab
TIFFSetWarningHandler	set warning handler function
roentgen b75cab
TIFFStripSize		returns size of a strip
roentgen b75cab
TIFFRawStripSize	returns the number of bytes in a raw strip
roentgen b75cab
TIFFSwabShort		swap bytes of short
roentgen b75cab
TIFFSwabLong		swap bytes of long
roentgen b75cab
TIFFSwabArrayOfShort	swap bytes of an array of shorts
roentgen b75cab
TIFFSwabArrayOfLong	swap bytes of an array of longs
roentgen b75cab
TIFFTileRowSize		return size of a row in a tile
roentgen b75cab
TIFFTileSize		return size of a tile
roentgen b75cab
TIFFUnRegisterCODEC	unregisters the codec
roentgen b75cab
TIFFVGetField		return tag value in current directory
roentgen b75cab
TIFFVGetFieldDefaulted	return tag value in current directory
roentgen b75cab
TIFFVSetField		set a tag's value in the current directory
roentgen b75cab
TIFFVStripSize		returns the number of bytes in a strip
roentgen b75cab
TIFFWarning		library warning handler
roentgen b75cab
TIFFWriteDirectory	write the current directory
roentgen b75cab
TIFFWriteEncodedStrip	compress and write a strip of data
roentgen b75cab
TIFFWriteEncodedTile	compress and write a tile of data
roentgen b75cab
TIFFWriteRawStrip	write a raw strip of data
roentgen b75cab
TIFFWriteRawTile	write a raw tile of data
roentgen b75cab
TIFFWriteScanline	write a scanline of data
roentgen b75cab
TIFFWriteTile		compress and write a tile of data
roentgen b75cab
TIFFXYZToRGB		perform CIE XYZ to RGB conversion
roentgen b75cab
TIFFYCbCrToRGBInit	initialize YCbCr to RGB conversion state
roentgen b75cab
TIFFYCbCrtoRGB		perform YCbCr to RGB conversion
roentgen b75cab
.sp
roentgen b75cab
Auxiliary functions:
roentgen b75cab
_TIFFfree		free memory buffer
roentgen b75cab
_TIFFmalloc		dynamically allocate memory buffer
roentgen b75cab
_TIFFmemcmp		compare contents of the memory buffers
roentgen b75cab
_TIFFmemcpy		copy contents of the one buffer to another
roentgen b75cab
_TIFFmemset		fill memory buffer with a constant byte
roentgen b75cab
_TIFFrealloc		dynamically reallocate memory buffer
roentgen b75cab
roentgen b75cab
.fi
roentgen b75cab
.SH "TAG USAGE"
roentgen b75cab
The table below lists the
roentgen b75cab
.SM TIFF
roentgen b75cab
tags that are recognized and handled by the library.
roentgen b75cab
If no use is indicated in the table, then the library
roentgen b75cab
reads and writes the tag, but does not use it internally.
roentgen b75cab
Note that some tags are meaningful only when a particular
roentgen b75cab
compression scheme is being used; e.g.
roentgen b75cab
.I Group3Options
roentgen b75cab
is only useful if 
roentgen b75cab
.I Compression
roentgen b75cab
is set to
roentgen b75cab
.SM CCITT
roentgen b75cab
Group 3 encoding.
roentgen b75cab
Tags of this sort are considered
roentgen b75cab
.I codec-specific
roentgen b75cab
tags and the library does not recognize them except when the
roentgen b75cab
.I Compression
roentgen b75cab
tag has been previously set to the relevant compression scheme.
roentgen b75cab
.sp
roentgen b75cab
.nf
roentgen b75cab
.ta \w'TIFFTAG_JPEGTABLESMODE'u+2n +\w'Value'u+2n +\w'R/W'u+2n
roentgen b75cab
\fITag Name\fP	\fIValue\fP	\fIR/W\fP	\fILibrary Use/Notes\fP
roentgen b75cab
.sp 5p
roentgen b75cab
.nf
roentgen b75cab
Artist	315	R/W
roentgen b75cab
BadFaxLines	326	R/W
roentgen b75cab
BitsPerSample	258	R/W	lots
roentgen b75cab
CellLength	265		parsed but ignored
roentgen b75cab
CellWidth	264		parsed but ignored
roentgen b75cab
CleanFaxData	327	R/W
roentgen b75cab
ColorMap	320	R/W
roentgen b75cab
ColorResponseUnit	300		parsed but ignored
roentgen b75cab
Compression	259	R/W	choosing codec
roentgen b75cab
ConsecutiveBadFaxLines	328	R/W
roentgen b75cab
Copyright       33432   R/W
roentgen b75cab
DataType	32996	R	obsoleted by SampleFormat tag
roentgen b75cab
DateTime	306	R/W
roentgen b75cab
DocumentName	269	R/W
roentgen b75cab
DotRange	336	R/W
roentgen b75cab
ExtraSamples	338	R/W	lots
roentgen b75cab
FaxRecvParams	34908	R/W
roentgen b75cab
FaxSubAddress	34909	R/W
roentgen b75cab
FaxRecvTime	34910	R/W
roentgen b75cab
FillOrder	266	R/W	control bit order
roentgen b75cab
FreeByteCounts	289		parsed but ignored
roentgen b75cab
FreeOffsets	288		parsed but ignored
roentgen b75cab
GrayResponseCurve	291		parsed but ignored
roentgen b75cab
GrayResponseUnit	290		parsed but ignored
roentgen b75cab
Group3Options	292	R/W	used by Group 3 codec
roentgen b75cab
Group4Options	293	R/W
roentgen b75cab
HostComputer	316	R/W
roentgen b75cab
ImageDepth	32997	R/W	tile/strip calculations
roentgen b75cab
ImageDescription 	270	R/W
roentgen b75cab
ImageLength	257	R/W	lots
roentgen b75cab
ImageWidth	256	R/W	lots
roentgen b75cab
InkNames	333	R/W
roentgen b75cab
InkSet	332	R/W
roentgen b75cab
JPEGTables	347	R/W	used by JPEG codec
roentgen b75cab
Make	271	R/W
roentgen b75cab
Matteing	32995	R	obsoleted by ExtraSamples tag
roentgen b75cab
MaxSampleValue	281	R/W
roentgen b75cab
MinSampleValue	280	R/W
roentgen b75cab
Model	272	R/W
roentgen b75cab
NewSubFileType	254	R/W	called SubFileType in spec
roentgen b75cab
NumberOfInks	334	R/W
roentgen b75cab
Orientation	274	R/W
roentgen b75cab
PageName	285	R/W
roentgen b75cab
PageNumber	297	R/W
roentgen b75cab
PhotometricInterpretation	262	R/W	used by Group 3 and JPEG codecs
roentgen b75cab
PlanarConfiguration	284	R/W	data i/o
roentgen b75cab
Predictor	317	R/W	used by LZW and Deflate codecs
roentgen b75cab
PrimaryChromacities	319	R/W
roentgen b75cab
ReferenceBlackWhite	532	R/W
roentgen b75cab
ResolutionUnit	296	R/W	used by Group 3 codec
roentgen b75cab
RowsPerStrip	278	R/W	data i/o
roentgen b75cab
SampleFormat	339	R/W
roentgen b75cab
SamplesPerPixel	277	R/W	lots
roentgen b75cab
SMinSampleValue	340	R/W
roentgen b75cab
SMaxSampleValue	341	R/W
roentgen b75cab
Software	305	R/W
roentgen b75cab
StoNits	37439	R/W
roentgen b75cab
StripByteCounts	279	R/W	data i/o
roentgen b75cab
StripOffsets	273	R/W	data i/o
roentgen b75cab
SubFileType	255	R/W	called OSubFileType in spec
roentgen b75cab
TargetPrinter	337	R/W
roentgen b75cab
Thresholding	263	R/W	
roentgen b75cab
TileByteCounts	324	R/W	data i/o
roentgen b75cab
TileDepth	32998	R/W	tile/strip calculations
roentgen b75cab
TileLength	323	R/W	data i/o
roentgen b75cab
TileOffsets	324	R/W	data i/o
roentgen b75cab
TileWidth	322	R/W	data i/o
roentgen b75cab
TransferFunction	301	R/W
roentgen b75cab
WhitePoint	318	R/W
roentgen b75cab
XPosition	286	R/W
roentgen b75cab
XResolution	282	R/W
roentgen b75cab
YCbCrCoefficients	529	R/W	used by TIFFRGBAImage support
roentgen b75cab
YCbCrPositioning	531	R/W	tile/strip size calulcations
roentgen b75cab
YCbCrSubsampling	530	R/W
roentgen b75cab
YPosition	286	R/W
roentgen b75cab
YResolution	283	R/W	used by Group 3 codec
roentgen b75cab
.SH "PSEUDO TAGS"
roentgen b75cab
In addition to the normal
roentgen b75cab
.SM TIFF
roentgen b75cab
tags the library supports a collection of 
roentgen b75cab
tags whose values lie in a range outside the valid range of 
roentgen b75cab
.SM TIFF
roentgen b75cab
tags.
roentgen b75cab
These tags are termed
roentgen b75cab
.I pseud-tags
roentgen b75cab
and are used to control various codec-specific functions within the library.
roentgen b75cab
The table below summarizes the defined pseudo-tags.
roentgen b75cab
.sp
roentgen b75cab
.nf
roentgen b75cab
.ta \w'TIFFTAG_JPEGTABLESMODE'u+2n +\w'Codec'u+2n +\w'R/W'u+2n
roentgen b75cab
\fITag Name\fP	\fICodec\fP	\fIR/W\fP	\fILibrary Use/Notes\fP
roentgen b75cab
.sp 5p
roentgen b75cab
.nf
roentgen b75cab
TIFFTAG_FAXMODE	G3	R/W	general codec operation
roentgen b75cab
TIFFTAG_FAXFILLFUNC	G3/G4	R/W	bitmap fill function
roentgen b75cab
TIFFTAG_JPEGQUALITY	JPEG	R/W	compression quality control
roentgen b75cab
TIFFTAG_JPEGCOLORMODE	JPEG	R/W	control colorspace conversions
roentgen b75cab
TIFFTAG_JPEGTABLESMODE	JPEG	R/W	control contents of \fIJPEGTables\fP tag
roentgen b75cab
TIFFTAG_ZIPQUALITY	Deflate	R/W	compression quality level
roentgen b75cab
TIFFTAG_PIXARLOGDATAFMT	PixarLog	R/W	user data format
roentgen b75cab
TIFFTAG_PIXARLOGQUALITY	PixarLog	R/W	compression quality level
roentgen b75cab
TIFFTAG_SGILOGDATAFMT	SGILog	R/W	user data format
roentgen b75cab
.fi
roentgen b75cab
.TP
roentgen b75cab
.B TIFFTAG_FAXMODE
roentgen b75cab
Control the operation of the Group 3 codec.
roentgen b75cab
Possible values (independent bits that can be combined by
roentgen b75cab
or'ing them together) are:
roentgen b75cab
FAXMODE_CLASSIC
roentgen b75cab
(enable old-style format in which the
roentgen b75cab
.SM RTC
roentgen b75cab
is written at the end of the last strip),
roentgen b75cab
FAXMODE_NORTC
roentgen b75cab
(opposite of 
roentgen b75cab
FAXMODE_CLASSIC;
roentgen b75cab
also called
roentgen b75cab
FAXMODE_CLASSF),
roentgen b75cab
FAXMODE_NOEOL
roentgen b75cab
(do not write 
roentgen b75cab
.SM EOL
roentgen b75cab
codes at the start of each row of data),
roentgen b75cab
FAXMODE_BYTEALIGN
roentgen b75cab
(align each encoded row to an 8-bit boundary),
roentgen b75cab
FAXMODE_WORDALIGN
roentgen b75cab
(align each encoded row to an 16-bit boundary),
roentgen b75cab
The default value is dependent on the compression scheme; this
roentgen b75cab
pseudo-tag is used by the various G3 and G4 codecs to share code.
roentgen b75cab
.TP
roentgen b75cab
.B TIFFTAG_FAXFILLFUNC
roentgen b75cab
Control the function used to convert arrays of black and white
roentgen b75cab
runs to packed bit arrays.
roentgen b75cab
This hook can be used to image decoded scanlines in multi-bit
roentgen b75cab
depth rasters (e.g. for display in colormap mode)
roentgen b75cab
or for other purposes.
roentgen b75cab
The default value is a pointer to a builtin function that images
roentgen b75cab
packed bilevel data.
roentgen b75cab
.TP
roentgen b75cab
.B TIFFTAG_IPTCNEWSPHOTO
roentgen b75cab
Tag contaings image metadata per the IPTC newsphoto spec: Headline, 
roentgen b75cab
captioning, credit, etc... Used by most wire services. 
roentgen b75cab
.TP
roentgen b75cab
.B TIFFTAG_PHOTOSHOP
roentgen b75cab
Tag contains Photoshop captioning information and metadata. Photoshop 
roentgen b75cab
uses in parallel and redundantly alongside IPTCNEWSPHOTO information. 
roentgen b75cab
.TP
roentgen b75cab
.B TIFFTAG_JPEGQUALITY
roentgen b75cab
Control the compression quality level used in the baseline algorithm.
roentgen b75cab
Note that quality levels are in the range 0-100 with a default value of 75.
roentgen b75cab
.TP
roentgen b75cab
.B TIFFTAG_JPEGCOLORMODE
roentgen b75cab
Control whether or not conversion is done between
roentgen b75cab
RGB and YCbCr colorspaces.
roentgen b75cab
Possible values are:
roentgen b75cab
JPEGCOLORMODE_RAW
roentgen b75cab
(do not convert), and
roentgen b75cab
JPEGCOLORMODE_RGB
roentgen b75cab
(convert to/from RGB)
roentgen b75cab
The default value is JPEGCOLORMODE_RAW.
roentgen b75cab
.TP
roentgen b75cab
.B TIFFTAG_JPEGTABLESMODE
roentgen b75cab
Control the information written in the 
roentgen b75cab
.I JPEGTables
roentgen b75cab
tag.
roentgen b75cab
Possible values (independent bits that can be combined by
roentgen b75cab
or'ing them together) are:
roentgen b75cab
JPEGTABLESMODE_QUANT
roentgen b75cab
(include quantization tables),
roentgen b75cab
and
roentgen b75cab
JPEGTABLESMODE_HUFF
roentgen b75cab
(include Huffman encoding tables).
roentgen b75cab
The default value is JPEGTABLESMODE_QUANT|JPEGTABLESMODE_HUFF.
roentgen b75cab
.TP
roentgen b75cab
.B TIFFTAG_ZIPQUALITY
roentgen b75cab
Control the compression technique used by the Deflate codec.
roentgen b75cab
Quality levels are in the range 1-9 with larger numbers yielding better
roentgen b75cab
compression at the cost of more computation.
roentgen b75cab
The default quality level is 6 which yields a good time-space tradeoff.
roentgen b75cab
.TP
roentgen b75cab
.B TIFFTAG_PIXARLOGDATAFMT
roentgen b75cab
Control the format of user data passed
roentgen b75cab
.I in
roentgen b75cab
to the PixarLog codec when encoding and passed
roentgen b75cab
.I out
roentgen b75cab
from when decoding.
roentgen b75cab
Possible values are:
roentgen b75cab
PIXARLOGDATAFMT_8BIT
roentgen b75cab
for 8-bit unsigned pixels,
roentgen b75cab
PIXARLOGDATAFMT_8BITABGR
roentgen b75cab
for 8-bit unsigned ABGR-ordered pixels,
roentgen b75cab
PIXARLOGDATAFMT_11BITLOG
roentgen b75cab
for 11-bit log-encoded raw data,
roentgen b75cab
PIXARLOGDATAFMT_12BITPICIO
roentgen b75cab
for 12-bit PICIO-compatible data,
roentgen b75cab
PIXARLOGDATAFMT_16BIT
roentgen b75cab
for 16-bit signed samples,
roentgen b75cab
and
roentgen b75cab
PIXARLOGDATAFMT_FLOAT
roentgen b75cab
for 32-bit IEEE floating point samples.
roentgen b75cab
.TP
roentgen b75cab
.B TIFFTAG_PIXARLOGQUALITY
roentgen b75cab
Control the compression technique used by the PixarLog codec.
roentgen b75cab
This value is treated identically to TIFFTAG_ZIPQUALITY; see the
roentgen b75cab
above description.
roentgen b75cab
.TP
roentgen b75cab
.B TIFFTAG_SGILOGDATAFMT
roentgen b75cab
Control the format of client data passed 
roentgen b75cab
.I in
roentgen b75cab
to the SGILog codec when encoding and passed
roentgen b75cab
.I out
roentgen b75cab
from when decoding.
roentgen b75cab
Possible values are:
roentgen b75cab
SGILOGDATAFMT_FLTXYZ
roentgen b75cab
for converting between LogLuv and 32-bit IEEE floating valued XYZ pixels,
roentgen b75cab
SGILOGDATAFMT_16BITLUV
roentgen b75cab
for 16-bit encoded Luv pixels,
roentgen b75cab
SGILOGDATAFMT_32BITRAW and SGILOGDATAFMT_24BITRAW
roentgen b75cab
for no conversion of data,
roentgen b75cab
SGILOGDATAFMT_8BITRGB
roentgen b75cab
for returning 8-bit RGB data (valid only when decoding LogLuv-encoded data),
roentgen b75cab
SGILOGDATAFMT_FLTY
roentgen b75cab
for converting between LogL and 32-bit IEEE floating valued Y pixels,
roentgen b75cab
SGILOGDATAFMT_16BITL
roentgen b75cab
for 16-bit encoded L pixels,
roentgen b75cab
and
roentgen b75cab
SGILOGDATAFMT_8BITGRY
roentgen b75cab
for returning 8-bit greyscale data
roentgen b75cab
(valid only when decoding LogL-encoded data).
roentgen b75cab
.SH DIAGNOSTICS
roentgen b75cab
All error messages are directed through the
roentgen b75cab
.IR TIFFError
roentgen b75cab
routine.
roentgen b75cab
By default messages are directed to
roentgen b75cab
.B stderr
roentgen b75cab
in the form:
roentgen b75cab
.IR "module: message\en."
roentgen b75cab
Warning messages are likewise directed through the
roentgen b75cab
.IR TIFFWarning
roentgen b75cab
routine.
roentgen b75cab
.SH "SEE ALSO"
roentgen b75cab
.BR fax2tiff (1),
roentgen b75cab
.BR gif2tiff (1),
roentgen b75cab
.BR pal2rgb (1),
roentgen b75cab
.BR ppm2tiff (1),
roentgen b75cab
.BR rgb2ycbcr (1),
roentgen b75cab
.BR ras2tiff (1),
roentgen b75cab
.BR raw2tiff (1),
roentgen b75cab
.BR sgi2tiff (1),
roentgen b75cab
.BR tiff2bw (1),
roentgen b75cab
.BR tiffdither (1),
roentgen b75cab
.BR tiffdump (1),
roentgen b75cab
.BR tiffcp (1),
roentgen b75cab
.BR tiffcmp (1),
roentgen b75cab
.BR tiffgt (1),
roentgen b75cab
.BR tiffinfo (1),
roentgen b75cab
.BR tiffmedian (1),
roentgen b75cab
.BR tiffsplit (1),
roentgen b75cab
.BR tiffsv (1).
roentgen b75cab
.PP
roentgen b75cab
.BR "Tag Image File Format Specification \(em Revision 6.0" ,
roentgen b75cab
an Aldus Technical Memorandum.
roentgen b75cab
.PP
roentgen b75cab
.BR "The Spirit of TIFF Class F" ,
roentgen b75cab
an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.
roentgen b75cab
.PP
roentgen b75cab
Libtiff library home page:
roentgen b75cab
.BR http://www.remotesensing.org/libtiff/
roentgen b75cab
.SH BUGS
roentgen b75cab
The library does not support multi-sample images
roentgen b75cab
where some samples have different bits/sample.
roentgen b75cab
.PP
roentgen b75cab
The library does not support random access to compressed data
roentgen b75cab
that is organized with more than one row per tile or strip.