'\" te .TH TIFFReadDirectory 3tiff "05 Apr 2004" "" "" .SH "NAME" TIFFReadDirectory \- get the contents of the next directory in an open TIFF file .SH "SYNOPSIS" .sp .nf \f(CW#include int TIFFReadDirectory(TIFF* tif)\fR .fi .sp .SH "" .PP Read the next directory in the specified file and make that the current directory\&. Applications only need to call \fBTIFFReadDirectory\fR to read multiple subfiles in a single TIFF file\&. The first directory in a file is automatically read when \fBTIFFOpen\fR is called\&. .SH "" .PP If the library is compiled with \fBSTRIPCHOP_SUPPORT\fR enabled, then images that have a single uncompressed strip or tile of data are automatically treated as if they were made up of multiple strips or tiles of approximately 8 kilobytes each\&. This operation is performed only in-memory and does not alter the contents of the file\&. However, the construction of the "chopped strips" is visible to the application through the number of strips [tiles] returned by \fBTIFFNumberOfStrips\fR [\fBTIFFNumberOfTiles\fR]\&. .SS "Diagnostics" .PP All error messages are directed to the \fBTIFFError(3tiff)\fR routine\&. All warning messages are directed to the \fBTIFFWarning(3tiff)\fR routine\&. .sp .ne 2 .mk \fBSeek error accessing TIFF directory\&.\fR .sp .6 .in +4 An error occurred while positioning to the location of the directory\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBWrong data type %d for field "%s"\&.\fR .sp .6 .in +4 The tag entry in the directory had an incorrect data type\&. For example, an \fBImageDescription\fR tag with a \fBSHORT\fR data type\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBTIFF directory is missing required "%s" field\&.\fR .sp .6 .in +4 The specified tag is required by the TIFF 5\&.0 specification to be present, but is missing\&. The directory is usually unusable\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB%s: Rational with zero denominator\&.\fR .sp .6 .in +4 A directory tag has a \fBRATIONAL\fR value whose denominator is zero\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBIncorrect count %d for field "%s" (%lu, expecting %lu); tag ignored\&.\fR .sp .6 .in +4 The count field for the specified tag is bad\&. For example, a count other than 1 for a \fBSubFileType\fR tag\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBCannot handle different per-sample values for field "%s"\&.\fR .sp .6 .in +4 The tag has \fBSamplesPerPixel\fR values that are not all the same\&. For example, \fBBitsPerSample\fR\&. The library is unable to manage images of this sort\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBCount mismatch for field "%s"; expecting %d, got %d\&.\fR .sp .6 .in +4 The count field in a tag does not agree with the number expected by the library\&. This should never happen\&. If this situation occurs, the library refuses to read the directory\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBInvalid TIFF directory; tags are not sorted in ascending order\&.\fR .sp .6 .in +4 The directory tags are not properly sorted as specified in the TIFF 5\&.0 specification\&. This error is not fatal\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBIgnoring unknown field with tag %d (0x%x)\&.\fR .sp .6 .in +4 An unknown tag was encountered in the directory\&. The library ignores all such tags\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBTIFF directory is missing required "ImageLength" field\&.\fR .sp .6 .in +4 The image violates the specification by not having a necessary field\&. The library cannot recover from this error\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBTIFF directory is missing required "PlanarConfig" field\&.\fR .sp .6 .in +4 The image violates the specification by not having a necessary field\&. The library cannot recover from this error\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBTIFF directory is missing required "StripOffsets" field\&.\fR .sp .6 .in +4 The image has multiple strips, but does not have the tag that specifies the file offset to each strip of data\&. The library cannot recover from this error\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBTIFF directory is missing required "TileOffsets" field\&.\fR .sp .6 .in +4 The image has multiple tiles, but does not have the tag that specifies the file offset to each tile of data\&. The library cannot recover from this error\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBTIFF directory is missing required "StripByteCounts" field\&.\fR .sp .6 .in +4 The image has multiple strips, but does not have the tag that specifies the size of each strip of data\&. The library cannot recover from this error\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBTIFF directory is missing required "StripByteCounts" field, calculating from imagelength\&.\fR .sp .6 .in +4 The image violates the specification by not having a necessary field\&. However, when the image is comprised of only one strip or tile, the library estimates the missing value based on the file size\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fBBogus "StripByteCounts" field, ignoring and calculating from imagelength\&.\fR .sp .6 .in +4 Certain vendors violate the specification by writing zero for the \fBStripByteCounts\fR tag when they want the value to remain unspecified\&. If the image has a single strip, the library estimates the missing value based on the file size\&. .sp .sp 1 .in -4 .SH "" .PP If the next directory was successfully read, 1 is returned\&. Otherwise, 0 is returned if an error was encountered, or if there are no more directories to be read\&. .SH "" .PP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .TS tab() allbox; cw(2.750000i)| cw(2.750000i) lw(2.750000i)| lw(2.750000i). ATTRIBUTE TYPEATTRIBUTE VALUE Availabilityimage/library/libtiff Interface stabilityUncommitted .TE .sp .SH "" .PP \fBlibtiff\fR(3), \fBTIFFOpen\fR(3tiff), \fBTIFFWriteDirectory\fR(3tiff), \fBTIFFSetDirectory\fR(3tiff), \fBTIFFSetSubDirectory\fR(3tiff) .SH "" .PP This man page was originally written by Sam Leffler\&. Updated by Breda McColgan, Sun Microsystems Inc\&., 2004\&. ...\" created by instant / solbook-to-man, Thu 20 Mar 2014, 02:30 ...\" LSARC 2003/085 libtiff, libjpeg, and libpng