Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tiffreaddirectory(3tiff) [mojave man page]

TIFFReadDirectory(3tiff)				 Introduction to Library Functions				  TIFFReadDirectory(3tiff)

NAME
TIFFReadDirectory - get the contents of the next directory in an open TIFF file SYNOPSIS
#include <tiffio.h> int TIFFReadDirectory(TIFF* tif) DESCRIPTION
Read the next directory in the specified file and make that the current directory. Applications only need to call TIFFReadDirectory to read multiple subfiles in a single TIFF file. The first directory in a file is automatically read when TIFFOpen is called. EXTENDED DESCRIPTION
If the library is compiled with STRIPCHOP_SUPPORT enabled, then images that have a single uncompressed strip or tile of data are automati- cally 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 TIFFNumberOfStrips [TIFFNumberOfTiles]. 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 SHORT data type. TIFF directory is missing required "%s" field. The specified tag is required by the TIFF 5.0 specification to be present, but is missing. The directory is usually unusable. %s: Rational with zero denominator. A directory tag has a RATIONAL value whose denominator is zero. Incorrect count %d for field "%s" (%lu, expecting %lu); tag ignored. The count field for the specified tag 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 that are not all the same. For example, BitsPerSample. The library is unable to manage 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. If this situation occurs, 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 TIFF 5.0 specification. This error is not fatal. 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. The library cannot recover from this error. TIFF directory is missing required "PlanarConfig" field. The image violates the specification by not having a necessary field. The library cannot recover from this error. TIFF directory is missing required "StripOffsets" field. 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. TIFF directory is missing required "TileOffsets" field. 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. TIFF directory is missing required "StripByteCounts" field. 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. 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 estimates 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 the value to remain unspecified. If the image has a single strip, the library estimates the missing value based on the file size. RETURN 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. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWTiff | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
libtiff(3), TIFFOpen(3tiff), TIFFWriteDirectory(3tiff), TIFFSetDirectory(3tiff), TIFFSetSubDirectory(3tiff) NOTES
This man page was originally written by Sam Leffler. Updated by Breda McColgan, Sun Microsystems Inc., 2004. SunOS 5.10 05 Apr 2004 TIFFReadDirectory(3tiff)
Man Page