Blame man/TIFFReadDirectory.3tiff

Packit 7838c8
.\" $Id: TIFFReadDirectory.3tiff,v 1.4 2016-09-25 20:05:49 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 TIFFReadDirectory 3TIFF "October 15, 1995" "libtiff"
Packit 7838c8
.SH NAME
Packit 7838c8
TIFFReadDirectory \- get the contents of the next directory in an open
Packit 7838c8
.SM TIFF
Packit 7838c8
file
Packit 7838c8
.SH SYNOPSIS
Packit 7838c8
.B "#include <tiffio.h>"
Packit 7838c8
.sp
Packit 7838c8
.BI "int TIFFReadDirectory(TIFF *" tif ")"
Packit 7838c8
.SH DESCRIPTION
Packit 7838c8
Read the next directory in the specified file and make it the current
Packit 7838c8
directory. Applications only need to call
Packit 7838c8
.I TIFFReadDirectory
Packit 7838c8
to read multiple subfiles in a single
Packit 7838c8
.SM TIFF
Packit 7838c8
file\(em
Packit 7838c8
the first directory in a file is automatically read when
Packit 7838c8
.IR TIFFOpen
Packit 7838c8
is called.
Packit 7838c8
.SH NOTES
Packit 7838c8
If the library is compiled with 
Packit 7838c8
.SM STRIPCHOP_SUPPORT
Packit 7838c8
enabled, then images that have a single uncompressed strip or tile of data are
Packit 7838c8
automatically treated as if they were made up of multiple strips or tiles of
Packit 7838c8
approximately 8 kilobytes each. This operation is done only in-memory; it does
Packit 7838c8
not alter the contents of the file. However, the construction of the ``chopped
Packit 7838c8
strips'' is visible to the application through the number of strips [tiles]
Packit 7838c8
returned by 
Packit 7838c8
.I TIFFNumberOfStrips
Packit 7838c8
[\c
Packit 7838c8
.IR TIFFNumberOfTiles ].
Packit 7838c8
.SH "RETURN VALUES"
Packit 7838c8
If the next directory was successfully read, 1 is returned. Otherwise, 0 is
Packit 7838c8
returned if an error was encountered, or if there are no more directories to
Packit 7838c8
be read.
Packit 7838c8
.SH DIAGNOSTICS
Packit 7838c8
All error messages are directed to the
Packit 7838c8
.IR TIFFError (3TIFF)
Packit 7838c8
routine.
Packit 7838c8
All warning messages are directed to the
Packit 7838c8
.IR TIFFWarning (3TIFF)
Packit 7838c8
routine.
Packit 7838c8
.PP
Packit 7838c8
\fBSeek error accessing TIFF directory\fP.
Packit 7838c8
An error occurred while positioning to the location of the
Packit 7838c8
directory.
Packit 7838c8
.PP
Packit 7838c8
\fBWrong data type %d for field "%s"\fP.
Packit 7838c8
The tag entry in the directory had an incorrect data type.
Packit 7838c8
For example, an
Packit 7838c8
.I ImageDescription
Packit 7838c8
tag with a
Packit 7838c8
.SM SHORT
Packit 7838c8
data type.
Packit 7838c8
.PP
Packit 7838c8
\fBTIFF directory is missing required "%s" field\fP.
Packit 7838c8
The specified tag is required to be present by the
Packit 7838c8
.SM TIFF
Packit 7838c8
5.0 specification, but is missing.
Packit 7838c8
The directory is (usually) unusable.
Packit 7838c8
.PP
Packit 7838c8
\fB%s: Rational with zero denominator\fP.
Packit 7838c8
A directory tag has a
Packit 7838c8
.SM RATIONAL
Packit 7838c8
value whose denominator is zero.
Packit 7838c8
.PP
Packit 7838c8
\fBIncorrect count %d for field "%s" (%lu, expecting %lu); tag ignored\fP.
Packit 7838c8
The specified tag's count field is bad.
Packit 7838c8
For example, a count other than 1 for a
Packit 7838c8
.I SubFileType
Packit 7838c8
tag.
Packit 7838c8
.PP
Packit 7838c8
\fBCannot handle different per-sample values for field "%s"\fP.
Packit 7838c8
The tag has
Packit 7838c8
.I SamplesPerPixel
Packit 7838c8
values and they are not all the same; e.g.
Packit 7838c8
.IR BitsPerSample .
Packit 7838c8
The library is unable to handle images of this sort.
Packit 7838c8
.PP
Packit 7838c8
\fBCount mismatch for field "%s"; expecting %d, got %d\fP.
Packit 7838c8
The count field in a
Packit 7838c8
tag does not agree with the number expected by the library.
Packit 7838c8
This should never happen, so if it does, the library refuses to
Packit 7838c8
read the directory.
Packit 7838c8
.PP
Packit 7838c8
\fBInvalid TIFF directory; tags are not sorted in ascending order\fP.
Packit 7838c8
The directory tags are not properly sorted as specified
Packit 7838c8
in the
Packit 7838c8
.SM TIFF
Packit 7838c8
5.0 specification.
Packit 7838c8
This error is not fatal.
Packit 7838c8
.PP
Packit 7838c8
\fBIgnoring unknown field with tag %d (0x%x)\fP.
Packit 7838c8
An unknown tag was encountered in the directory;
Packit 7838c8
the library ignores all such tags.
Packit 7838c8
.PP
Packit 7838c8
\fBTIFF directory is missing required "ImageLength" field\fP.
Packit 7838c8
The image violates the specification by not having a necessary field.
Packit 7838c8
There is no way for the library to recover from this error.
Packit 7838c8
.PP
Packit 7838c8
\fBTIFF directory is missing required "PlanarConfig" field\fP.
Packit 7838c8
The image violates the specification by not having a necessary field.
Packit 7838c8
There is no way for the library to recover from this error.
Packit 7838c8
.PP
Packit 7838c8
\fBTIFF directory is missing required "StripOffsets" field\fP.
Packit 7838c8
The image has multiple strips, but is missing the tag that
Packit 7838c8
specifies the file offset to each strip of data.
Packit 7838c8
There is no way for the library to recover from this error.
Packit 7838c8
.PP
Packit 7838c8
\fBTIFF directory is missing required "TileOffsets" field\fP.
Packit 7838c8
The image has multiple tiles, but is missing the tag that
Packit 7838c8
specifies the file offset to each tile of data.
Packit 7838c8
There is no way for the library to recover from this error.
Packit 7838c8
.PP
Packit 7838c8
\fBTIFF directory is missing required "StripByteCounts" field\fP.
Packit 7838c8
The image has multiple strips, but is missing the tag that
Packit 7838c8
specifies the size of each strip of data.
Packit 7838c8
There is no way for the library to recover from this error.
Packit 7838c8
.PP
Packit 7838c8
\fBTIFF directory is missing required "StripByteCounts" field, calculating from imagelength\fP.
Packit 7838c8
The image violates the specification by not having a necessary field.
Packit 7838c8
However, when the image is comprised of only one strip or tile, the
Packit 7838c8
library will estimate the missing value based on the file size.
Packit 7838c8
.PP
Packit 7838c8
\fBBogus "StripByteCounts" field, ignoring and calculating from imagelength\fP.
Packit 7838c8
Certain vendors violate the specification by writing zero for
Packit 7838c8
the StripByteCounts tag when they want to leave the value
Packit 7838c8
unspecified.
Packit 7838c8
If the image has a single strip, the library will estimate
Packit 7838c8
the missing value based on the file size.
Packit 7838c8
.SH "SEE ALSO"
Packit 7838c8
.BR TIFFOpen (3TIFF),
Packit 7838c8
.BR TIFFWriteDirectory (3TIFF),
Packit 7838c8
.BR TIFFSetDirectory (3TIFF),
Packit 7838c8
.BR TIFFSetSubDirectory (3TIFF),
Packit 7838c8
.BR libtiff (3TIFF)
Packit 7838c8
.PP
Packit 7838c8
Libtiff library home page:
Packit 7838c8
.BR http://www.simplesystems.org/libtiff/