TIFFReadDirectory



TIFFReadDirectory

NAME
SYNOPSIS
DESCRIPTION
NOTES
RETURN VALUES
DIAGNOSTICS
SEE ALSO

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 it 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.

NOTES

If the library is compiled with STRIPCHOP_SUPPORT 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 done only in-memory; it 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].

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.

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 to be present by the TIFF 5.0 specification, 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 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 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. 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: http://www.remotesensing.org/libtiff/






Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.