TIFFReadDirectory (3)
Leading comments
$Id: TIFFReadDirectory.3tiff,v 1.4 2016-09-25 20:05:49 bfriesen Exp $ Copyright (c) 1988-1997 Sam Leffler Copyright (c) 1991-1997 Silicon Graphics, Inc. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in all copies of the software and related documentation, and (ii) the names of Sam Leffler and Silicon Graphics may not be us...
NAME
TIFFReadDirectory - get the contents of the next directory in an openSYNOPSIS
#include <tiffio.h>int TIFFReadDirectory(TIFF *tif)
DESCRIPTION
Read the next directory in the specified file and make it the current directory. Applications only need to call TIFFReadDirectory to read multiple subfiles in a singleNOTES
If the library is compiled withRETURN VALUES
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.DIAGNOSTICS
All error messages are directed to the TIFFError(3TIFF) routine. All warning messages are directed to the TIFFWarning(3TIFF) routine.Seek error accessing TIFF directory. An error occurred while positioning to the location of the directory.
Wrong data type %d for field "%s". The tag entry in the directory had an incorrect data type. For example, an ImageDescription tag with a
TIFF directory is missing required "%s" field. The specified tag is required to be present by the
%s: Rational with zero denominator. A directory tag has a
Incorrect count %d for field "%s" (%lu, expecting %lu); tag ignored. The specified tag's count field is bad. For example, a count other than 1 for a SubFileType tag.
Cannot handle different per-sample values for field "%s". The tag has SamplesPerPixel values and they are not all the same; e.g. BitsPerSample. The library is unable to handle images of this sort.
Count mismatch for field "%s"; expecting %d, got %d. The count field in a tag does not agree with the number expected by the library. This should never happen, so if it does, the library refuses to read the directory.
Invalid TIFF directory; tags are not sorted in ascending order. The directory tags are not properly sorted as specified in the
Ignoring unknown field with tag %d (0x%x). An unknown tag was encountered in the directory; the library ignores all such tags.
TIFF directory is missing required "ImageLength" field. The image violates the specification by not having a necessary field. There is no way for the library to recover from this error.
TIFF directory is missing required "PlanarConfig" field. The image violates the specification by not having a necessary field. There is no way for the library to recover from this error.
TIFF directory is missing required "StripOffsets" field. The image has multiple strips, but is missing the tag that specifies the file offset to each strip of data. There is no way for the library to recover from this error.
TIFF directory is missing required "TileOffsets" field. The image has multiple tiles, but is missing the tag that specifies the file offset to each tile of data. There is no way for the library to recover from this error.
TIFF directory is missing required "StripByteCounts" field. The image has multiple strips, but is missing the tag that specifies the size of each strip of data. There is no way for the library to recover from this error.
TIFF directory is missing required "StripByteCounts" field, calculating from imagelength. 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 will estimate the missing value based on the file size.
Bogus "StripByteCounts" field, ignoring and calculating from imagelength. Certain vendors violate the specification by writing zero for the StripByteCounts tag when they want to leave the value unspecified. If the image has a single strip, the library will estimate the missing value based on the file size.
SEE ALSO
TIFFOpen(3TIFF), TIFFWriteDirectory(3TIFF), TIFFSetDirectory(3TIFF), TIFFSetSubDirectory(3TIFF), libtiff(3TIFF)Libtiff library home page: www.simplesystems.org/libtiff