Blame man/TIFFReadDirectory.3tiff

Packit 994f1a
.\" $Id: TIFFReadDirectory.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
Packit 994f1a
.\"
Packit 994f1a
.\" Copyright (c) 1988-1997 Sam Leffler
Packit 994f1a
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
Packit 994f1a
.\"
Packit 994f1a
.\" Permission to use, copy, modify, distribute, and sell this software and 
Packit 994f1a
.\" its documentation for any purpose is hereby granted without fee, provided
Packit 994f1a
.\" that (i) the above copyright notices and this permission notice appear in
Packit 994f1a
.\" all copies of the software and related documentation, and (ii) the names of
Packit 994f1a
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
Packit 994f1a
.\" publicity relating to the software without the specific, prior written
Packit 994f1a
.\" permission of Sam Leffler and Silicon Graphics.
Packit 994f1a
.\" 
Packit 994f1a
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
Packit 994f1a
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
Packit 994f1a
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
Packit 994f1a
.\" 
Packit 994f1a
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
Packit 994f1a
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
Packit 994f1a
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
Packit 994f1a
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
Packit 994f1a
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
Packit 994f1a
.\" OF THIS SOFTWARE.
Packit 994f1a
.\"
Packit 994f1a
.if n .po 0
Packit 994f1a
.TH TIFFReadDirectory 3TIFF "October 15, 1995" "libtiff"
Packit 994f1a
.SH NAME
Packit 994f1a
TIFFReadDirectory \- get the contents of the next directory in an open
Packit 994f1a
.SM TIFF
Packit 994f1a
file
Packit 994f1a
.SH SYNOPSIS
Packit 994f1a
.B "#include <tiffio.h>"
Packit 994f1a
.sp
Packit 994f1a
.BI "int TIFFReadDirectory(TIFF *" tif ")"
Packit 994f1a
.SH DESCRIPTION
Packit 994f1a
Read the next directory in the specified file and make it the current
Packit 994f1a
directory. Applications only need to call
Packit 994f1a
.I TIFFReadDirectory
Packit 994f1a
to read multiple subfiles in a single
Packit 994f1a
.SM TIFF
Packit 994f1a
file\(em
Packit 994f1a
the first directory in a file is automatically read when
Packit 994f1a
.IR TIFFOpen
Packit 994f1a
is called.
Packit 994f1a
.SH NOTES
Packit 994f1a
If the library is compiled with 
Packit 994f1a
.SM STRIPCHOP_SUPPORT
Packit 994f1a
enabled, then images that have a single uncompressed strip or tile of data are
Packit 994f1a
automatically treated as if they were made up of multiple strips or tiles of
Packit 994f1a
approximately 8 kilobytes each. This operation is done only in-memory; it does
Packit 994f1a
not alter the contents of the file. However, the construction of the ``chopped
Packit 994f1a
strips'' is visible to the application through the number of strips [tiles]
Packit 994f1a
returned by 
Packit 994f1a
.I TIFFNumberOfStrips
Packit 994f1a
[\c
Packit 994f1a
.IR TIFFNumberOfTiles ].
Packit 994f1a
.SH "RETURN VALUES"
Packit 994f1a
If the next directory was successfully read, 1 is returned. Otherwise, 0 is
Packit 994f1a
returned if an error was encountered, or if there are no more directories to
Packit 994f1a
be read.
Packit 994f1a
.SH DIAGNOSTICS
Packit 994f1a
All error messages are directed to the
Packit 994f1a
.IR TIFFError (3TIFF)
Packit 994f1a
routine.
Packit 994f1a
All warning messages are directed to the
Packit 994f1a
.IR TIFFWarning (3TIFF)
Packit 994f1a
routine.
Packit 994f1a
.PP
Packit 994f1a
\fBSeek error accessing TIFF directory\fP.
Packit 994f1a
An error occurred while positioning to the location of the
Packit 994f1a
directory.
Packit 994f1a
.PP
Packit 994f1a
\fBWrong data type %d for field "%s"\fP.
Packit 994f1a
The tag entry in the directory had an incorrect data type.
Packit 994f1a
For example, an
Packit 994f1a
.I ImageDescription
Packit 994f1a
tag with a
Packit 994f1a
.SM SHORT
Packit 994f1a
data type.
Packit 994f1a
.PP
Packit 994f1a
\fBTIFF directory is missing required "%s" field\fP.
Packit 994f1a
The specified tag is required to be present by the
Packit 994f1a
.SM TIFF
Packit 994f1a
5.0 specification, but is missing.
Packit 994f1a
The directory is (usually) unusable.
Packit 994f1a
.PP
Packit 994f1a
\fB%s: Rational with zero denominator\fP.
Packit 994f1a
A directory tag has a
Packit 994f1a
.SM RATIONAL
Packit 994f1a
value whose denominator is zero.
Packit 994f1a
.PP
Packit 994f1a
\fBIncorrect count %d for field "%s" (%lu, expecting %lu); tag ignored\fP.
Packit 994f1a
The specified tag's count field is bad.
Packit 994f1a
For example, a count other than 1 for a
Packit 994f1a
.I SubFileType
Packit 994f1a
tag.
Packit 994f1a
.PP
Packit 994f1a
\fBCannot handle different per-sample values for field "%s"\fP.
Packit 994f1a
The tag has
Packit 994f1a
.I SamplesPerPixel
Packit 994f1a
values and they are not all the same; e.g.
Packit 994f1a
.IR BitsPerSample .
Packit 994f1a
The library is unable to handle images of this sort.
Packit 994f1a
.PP
Packit 994f1a
\fBCount mismatch for field "%s"; expecting %d, got %d\fP.
Packit 994f1a
The count field in a
Packit 994f1a
tag does not agree with the number expected by the library.
Packit 994f1a
This should never happen, so if it does, the library refuses to
Packit 994f1a
read the directory.
Packit 994f1a
.PP
Packit 994f1a
\fBInvalid TIFF directory; tags are not sorted in ascending order\fP.
Packit 994f1a
The directory tags are not properly sorted as specified
Packit 994f1a
in the
Packit 994f1a
.SM TIFF
Packit 994f1a
5.0 specification.
Packit 994f1a
This error is not fatal.
Packit 994f1a
.PP
Packit 994f1a
\fBIgnoring unknown field with tag %d (0x%x)\fP.
Packit 994f1a
An unknown tag was encountered in the directory;
Packit 994f1a
the library ignores all such tags.
Packit 994f1a
.PP
Packit 994f1a
\fBTIFF directory is missing requred "ImageLength" field\fP.
Packit 994f1a
The image violates the specification by not having a necessary field.
Packit 994f1a
There is no way for the library to recover from this error.
Packit 994f1a
.PP
Packit 994f1a
\fBTIFF directory is missing requred "PlanarConfig" field\fP.
Packit 994f1a
The image violates the specification by not having a necessary field.
Packit 994f1a
There is no way for the library to recover from this error.
Packit 994f1a
.PP
Packit 994f1a
\fBTIFF directory is missing requred "StripOffsets" field\fP.
Packit 994f1a
The image has multiple strips, but is missing the tag that
Packit 994f1a
specifies the file offset to each strip of data.
Packit 994f1a
There is no way for the library to recover from this error.
Packit 994f1a
.PP
Packit 994f1a
\fBTIFF directory is missing requred "TileOffsets" field\fP.
Packit 994f1a
The image has multiple tiles, but is missing the tag that
Packit 994f1a
specifies the file offset to each tile of data.
Packit 994f1a
There is no way for the library to recover from this error.
Packit 994f1a
.PP
Packit 994f1a
\fBTIFF directory is missing required "StripByteCounts" field\fP.
Packit 994f1a
The image has multiple strips, but is missing the tag that
Packit 994f1a
specifies the size of each strip of data.
Packit 994f1a
There is no way for the library to recover from this error.
Packit 994f1a
.PP
Packit 994f1a
\fBTIFF directory is missing required "StripByteCounts" field, calculating from imagelength\fP.
Packit 994f1a
The image violates the specification by not having a necessary field.
Packit 994f1a
However, when the image is comprised of only one strip or tile, the
Packit 994f1a
library will estimate the missing value based on the file size.
Packit 994f1a
.PP
Packit 994f1a
\fBBogus "StripByteCounts" field, ignoring and calculating from imagelength\fP.
Packit 994f1a
Certain vendors violate the specification by writing zero for
Packit 994f1a
the StripByteCounts tag when they want to leave the value
Packit 994f1a
unspecified.
Packit 994f1a
If the image has a single strip, the library will estimate
Packit 994f1a
the missing value based on the file size.
Packit 994f1a
.SH "SEE ALSO"
Packit 994f1a
.BR TIFFOpen (3TIFF),
Packit 994f1a
.BR TIFFWriteDirectory (3TIFF),
Packit 994f1a
.BR TIFFSetDirectory (3TIFF),
Packit 994f1a
.BR TIFFSetSubDirectory (3TIFF),
Packit 994f1a
.BR libtiff (3TIFF)
Packit 994f1a
.PP
Packit 994f1a
Libtiff library home page:
Packit 994f1a
.BR http://www.remotesensing.org/libtiff/