roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab
<meta content="groff -Thtml, see www.gnu.org" name="generator">
roentgen b75cab
<meta content="text/css" name="Content-Style">
roentgen b75cab
<title>TIFFReadDirectory</title>
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

TIFFReadDirectory

roentgen b75cab
NAME
roentgen b75cab
SYNOPSIS
roentgen b75cab
DESCRIPTION
roentgen b75cab
NOTES
roentgen b75cab
RETURN VALUES
roentgen b75cab
DIAGNOSTICS
roentgen b75cab
SEE ALSO
roentgen b75cab
roentgen b75cab

roentgen b75cab
roentgen b75cab

NAME

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

<big>TIFFReadDirectory − get the contents of the</big>

roentgen b75cab
next directory in an open TIFF <big>file</big>

roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

SYNOPSIS

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

<big>#include <tiffio.h></big>

roentgen b75cab
roentgen b75cab

<big>int TIFFReadDirectory(TIFF</big>

roentgen b75cab
*tif)

roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

DESCRIPTION

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

<big>Read the next directory in the specified file and</big>

roentgen b75cab
make it the current directory. Applications only need to
roentgen b75cab
call TIFFReadDirectory to read multiple subfiles in a
roentgen b75cab
single TIFF <big>file— the first directory in a</big>
roentgen b75cab
file is automatically read when TIFFOpen is
roentgen b75cab
called.

roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

NOTES

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

<big>If the library is compiled with</big>

roentgen b75cab
STRIPCHOP_SUPPORT <big>enabled, then images that have a</big>
roentgen b75cab
single uncompressed strip or tile of data are automatically
roentgen b75cab
treated as if they were made up of multiple strips or tiles
roentgen b75cab
of approximately 8 kilobytes each. This operation is done
roentgen b75cab
only in-memory; it does not alter the contents of the file.
roentgen b75cab
However, the construction of the ‘‘chopped
roentgen b75cab
strips’’ is visible to the application through
roentgen b75cab
the number of strips [tiles] returned by
roentgen b75cab
TIFFNumberOfStrips
roentgen b75cab
[TIFFNumberOfTiles].

roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

RETURN VALUES

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

<big>If the next directory was successfully read, 1 is</big>

roentgen b75cab
returned. Otherwise, 0 is returned if an error was
roentgen b75cab
encountered, or if there are no more directories to be
roentgen b75cab
read.

roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

DIAGNOSTICS

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

<big>All error messages are directed to the</big>

roentgen b75cab
TIFFError(3TIFF) routine. All warning messages are
roentgen b75cab
directed to the TIFFWarning(3TIFF) routine.

roentgen b75cab
roentgen b75cab

<big>Seek error accessing TIFF directory. An error</big>

roentgen b75cab
occurred while positioning to the location of the
roentgen b75cab
directory.

roentgen b75cab
roentgen b75cab

<big>Wrong data type %d for field "%s".</big>

roentgen b75cab
The tag entry in the directory had an incorrect data type.
roentgen b75cab
For example, an ImageDescription tag with a
roentgen b75cab
SHORT <big>data type.</big>

roentgen b75cab
roentgen b75cab

<big>TIFF directory is missing required "%s"</big>

roentgen b75cab
field. The specified tag is required to be present by
roentgen b75cab
the TIFF <big>5.0 specification, but is missing. The</big>
roentgen b75cab
directory is (usually) unusable.

roentgen b75cab
roentgen b75cab

<big>%s: Rational with zero denominator. A</big>

roentgen b75cab
directory tag has a RATIONAL <big>value whose</big>
roentgen b75cab
denominator is zero.

roentgen b75cab
roentgen b75cab

<big>Incorrect count %d for field "%s" (%lu,</big>

roentgen b75cab
expecting %lu); tag ignored. The specified tag’s
roentgen b75cab
count field is bad. For example, a count other than 1 for a
roentgen b75cab
SubFileType tag.

roentgen b75cab
roentgen b75cab

<big>Cannot handle different per-sample values for</big>

roentgen b75cab
field "%s". The tag has SamplesPerPixel
roentgen b75cab
values and they are not all the same; e.g.
roentgen b75cab
BitsPerSample. The library is unable to handle images
roentgen b75cab
of this sort.

roentgen b75cab
roentgen b75cab

<big>Count mismatch for field "%s";</big>

roentgen b75cab
expecting %d, got %d. The count field in a tag does not
roentgen b75cab
agree with the number expected by the library. This should
roentgen b75cab
never happen, so if it does, the library refuses to read the
roentgen b75cab
directory.

roentgen b75cab
roentgen b75cab

<big>Invalid TIFF directory; tags are not sorted in</big>

roentgen b75cab
ascending order. The directory tags are not properly
roentgen b75cab
sorted as specified in the TIFF <big>5.0</big>
roentgen b75cab
specification. This error is not fatal.

roentgen b75cab
roentgen b75cab

<big>Ignoring unknown field with tag %d (0x%x). An</big>

roentgen b75cab
unknown tag was encountered in the directory; the library
roentgen b75cab
ignores all such tags.

roentgen b75cab
roentgen b75cab

<big>TIFF directory is missing requred</big>

roentgen b75cab
"ImageLength" field. The image violates the
roentgen b75cab
specification by not having a necessary field. There is no
roentgen b75cab
way for the library to recover from this error.

roentgen b75cab
roentgen b75cab

<big>TIFF directory is missing requred</big>

roentgen b75cab
"PlanarConfig" field. The image violates the
roentgen b75cab
specification by not having a necessary field. There is no
roentgen b75cab
way for the library to recover from this error.

roentgen b75cab
roentgen b75cab

<big>TIFF directory is missing requred</big>

roentgen b75cab
"StripOffsets" field. The image has multiple
roentgen b75cab
strips, but is missing the tag that specifies the file
roentgen b75cab
offset to each strip of data. There is no way for the
roentgen b75cab
library to recover from this error.

roentgen b75cab
roentgen b75cab

<big>TIFF directory is missing requred</big>

roentgen b75cab
"TileOffsets" field. The image has multiple
roentgen b75cab
tiles, but is missing the tag that specifies the file offset
roentgen b75cab
to each tile of data. There is no way for the library to
roentgen b75cab
recover from this error.

roentgen b75cab
roentgen b75cab

<big>TIFF directory is missing required</big>

roentgen b75cab
"StripByteCounts" field. The image has
roentgen b75cab
multiple strips, but is missing the tag that specifies the
roentgen b75cab
size of each strip of data. There is no way for the library
roentgen b75cab
to recover from this error.

roentgen b75cab
roentgen b75cab

<big>TIFF directory is missing required</big>

roentgen b75cab
"StripByteCounts" field, calculating from
roentgen b75cab
imagelength. The image violates the specification by not
roentgen b75cab
having a necessary field. However, when the image is
roentgen b75cab
comprised of only one strip or tile, the library will
roentgen b75cab
estimate the missing value based on the file size.

roentgen b75cab
roentgen b75cab

<big>Bogus "StripByteCounts" field, ignoring</big>

roentgen b75cab
and calculating from imagelength. Certain vendors
roentgen b75cab
violate the specification by writing zero for the
roentgen b75cab
StripByteCounts tag when they want to leave the value
roentgen b75cab
unspecified. If the image has a single strip, the library
roentgen b75cab
will estimate the missing value based on the file
roentgen b75cab
size.

roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

SEE ALSO

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

<big>TIFFOpen(3TIFF),</big>

roentgen b75cab
TIFFWriteDirectory(3TIFF),
roentgen b75cab
TIFFSetDirectory(3TIFF),
roentgen b75cab
TIFFSetSubDirectory(3TIFF),
roentgen b75cab
libtiff(3TIFF)

roentgen b75cab
roentgen b75cab

<big>Libtiff library home page:</big>

roentgen b75cab
http://www.remotesensing.org/libtiff/

roentgen b75cab
roentgen b75cab
roentgen b75cab

roentgen b75cab
roentgen b75cab