Blame man/libtiff.3tiff

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