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