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