10139N/A<!
DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
10139N/A<!--ArborText, Inc., 1988-1999, v.4002-->
10139N/A<!
ENTITY cmd "TIFFReadDirectory">
10139N/A<!
ENTITY suncopy "Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.">
10139N/A<
refentry id="TIFFReadDirectory-3tiff">
10139N/A<
refmeta><
refentrytitle>TIFFReadDirectory</
refentrytitle><
manvolnum>3tiff
10139N/A<
refmiscinfo class="date">05 Apr 2004</
refmiscinfo>
10139N/A<
refmiscinfo class="sectdesc">&man3;</
refmiscinfo>
10139N/A<
refmiscinfo class="software">&release;</
refmiscinfo>
10139N/A<
refmiscinfo class="arch">generic</
refmiscinfo>
10139N/A<
refmiscinfo class="copyright">&suncopy;</
refmiscinfo>
10139N/A<
indexterm><
primary>TIFFReadDirectory</
primary></
indexterm><
indexterm><
primary>
10139N/Aget the contents of the next directory in an open TIFF file</
primary></
indexterm>
10139N/A<
refnamediv id="TIFFReadDirectory-3tiff-name"><
refname>TIFFReadDirectory</
refname>
10139N/A<
refpurpose>get the contents of the next directory in an open TIFF file</
refpurpose>
10139N/A<
refsect1 id="TIFFReadDirectory-3tiff-synp"><
title>&synp-tt;</
title>
10139N/Aint TIFFReadDirectory(TIFF* tif)</
programlisting>
10139N/A<
refsect1 id="TIFFReadDirectory-3tiff-desc"><
title>&desc-tt;</
title>
10139N/A<
para>Read the next directory in the specified file and make that the current
10139N/Adirectory. Applications only need to call <
literal>TIFFReadDirectory</
literal>
10139N/Ato read multiple subfiles in a single TIFF file. The first directory in a
10139N/Afile is automatically read when <
literal>TIFFOpen</
literal> is called.</
para>
10139N/A<
refsect1 id="TIFFReadDirectory-3tiff-exde"><
title>&exde-tt;</
title>
10139N/A<
para>If the library is compiled with <
literal>STRIPCHOP_SUPPORT</
literal>
10139N/Aenabled, then images that have a single uncompressed strip or tile of data
10139N/Aare automatically treated as if they were made up of multiple strips or tiles
10139N/Aof approximately 8 kilobytes each. This operation is performed only in-memory
10139N/Aand does not alter the contents of the file. However, the construction of
10139N/Athe “chopped strips” is visible to the application through the
10139N/Anumber of strips [tiles] returned by <
literal>TIFFNumberOfStrips</
literal>
10139N/A[<
literal>TIFFNumberOfTiles</
literal>].</
para>
10139N/A<
refsect2 id="TIFFReadDirectory-3tiff-exde-diags">
10139N/A<
para>All error messages are directed to the <
literal>TIFFError(3tiff)</
literal>
10139N/Aroutine. All warning messages are directed to the <
literal>TIFFWarning(3tiff)
10139N/A<
variablelist termlength="wholeline">
10139N/A<
varlistentry><
term>Seek error accessing TIFF directory.</
term><
listitem>
10139N/A<
para>An error occurred while positioning to the location of the directory.
10139N/A<
varlistentry><
term>Wrong data type %d for field "%s".</
term><
listitem><
para>
10139N/AThe tag entry in the directory had an incorrect data type. For example, an <
literal>
10139N/AImageDescription</
literal> tag with a <
literal>SHORT</
literal> data type.
10139N/A<
varlistentry><
term>TIFF directory is missing required "%s" field.</
term>
10139N/A<
listitem><
para>The specified tag is required by the TIFF 5.0 specification
10139N/Ato be present, but is missing. The directory is usually unusable.</
para>
10139N/A<
varlistentry><
term>%s: Rational with zero denominator.</
term><
listitem><
para>
10139N/AA directory tag has a <
literal>RATIONAL</
literal> value whose denominator
10139N/A<
varlistentry><
term>Incorrect count %d for field "%s" (%lu, expecting %lu);
10139N/Atag ignored.</
term><
listitem><
para>The count field for the specified tag is
10139N/Abad. For example, a count other than 1 for a <
literal>SubFileType</
literal>
10139N/A<
varlistentry><
term>Cannot handle different per-sample values for field "%s".
10139N/A</
term><
listitem><
para>The tag has <
literal>SamplesPerPixel</
literal> values
10139N/Athat are not all the same. For example, <
literal>BitsPerSample</
literal>.
10139N/AThe library is unable to manage images of this sort.</
para>
10139N/A<
varlistentry><
term>Count mismatch for field "%s"; expecting %d, got %d.</
term>
10139N/A<
listitem><
para>The count field in a tag does not agree with the number expected
10139N/Aby the library. This should never happen. If this situation occurs, the library
10139N/Arefuses to read the directory.</
para>
10139N/A<
varlistentry><
term>Invalid TIFF directory; tags are not sorted in ascending
10139N/Aorder.</
term><
listitem><
para>The directory tags are not properly sorted as
10139N/Aspecified in the TIFF 5.0 specification. This error is not fatal.</
para>
10139N/A<
varlistentry><
term>Ignoring unknown field with tag %d (0x%x).</
term><
listitem>
10139N/A<
para>An unknown tag was encountered in the directory. The library ignores
10139N/A<
varlistentry><
term>TIFF directory is missing required "ImageLength" field.
10139N/A</
term><
listitem><
para>The image violates the specification by not having
10139N/Aa necessary field. The library cannot recover from this error.</
para>
10139N/A<
varlistentry><
term>TIFF directory is missing required "PlanarConfig" field.
10139N/A</
term><
listitem><
para>The image violates the specification by not having
10139N/Aa necessary field. The library cannot recover from this error.</
para>
10139N/A<
varlistentry><
term>TIFF directory is missing required "StripOffsets" field.
10139N/A</
term><
listitem><
para>The image has multiple strips, but does not have the tag
10139N/Athat specifies the file offset to each strip of data. The library cannot recover
10139N/A<
varlistentry><
term>TIFF directory is missing required "TileOffsets" field.
10139N/A</
term><
listitem><
para>The image has multiple tiles, but does not have the tag
10139N/Athat specifies the file offset to each tile of data. The library cannot recover
10139N/A<
varlistentry><
term>TIFF directory is missing required "StripByteCounts" field.
10139N/A</
term><
listitem><
para>The image has multiple strips, but does not have the tag
10139N/Athat specifies the size of each strip of data. The library cannot recover
10139N/A<
varlistentry><
term>TIFF directory is missing required "StripByteCounts" field,
10139N/Acalculating from imagelength.</
term><
listitem><
para>The image violates the
10139N/Aspecification by not having a necessary field. However, when the image is
10139N/Acomprised of only one strip or tile, the library estimates the missing value
10139N/A<
varlistentry><
term>Bogus "StripByteCounts" field, ignoring and calculating
10139N/Afrom imagelength.</
term><
listitem><
para>Certain vendors violate the specification
10139N/Aby writing zero for the <
literal>StripByteCounts</
literal> tag when they want
10139N/A<?
Pub Caret>the value to remain unspecified. If the image has a single strip,
10139N/Athe library estimates the missing value based on the file size.</
para>
10139N/A<
refsect1 id="TIFFReadDirectory-3tiff-rtrn"><
title>&rtrn-tt;</
title>
10139N/A<
para>If the next directory was successfully read, 1 is returned. Otherwise,
10139N/A0 is returned if an error was encountered, or if there are no more directories
10139N/A<
refsect1 id="TIFFReadDirectory-3tiff-attr"><
title>&attr-tt;</
title>
10139N/A<
para>See <
olink targetdocent="REFMAN5" localinfo="attributes-5"><
citerefentry>
10139N/A<
refentrytitle>attributes</
refentrytitle><
manvolnum>5</
manvolnum></
citerefentry></
olink>
10139N/Afor descriptions of the following attributes:</
para>
10139N/A<
tgroup cols="2" colsep="1" rowsep="1"><
colspec colname="COLSPEC0" colwidth="1*">
10139N/A<
colspec colname="COLSPEC1" colwidth="1*">
10139N/A<
row><
entry align="center" valign="middle">ATTRIBUTE TYPE</
entry><
entry align="center" 10139N/Avalign="middle">ATTRIBUTE VALUE</
entry></
row>
10139N/A<
row><
entry><
para>Availability</
para></
entry><
entry><
para>SUNWTiff</
para></
entry>
10139N/A<
row><
entry colname="COLSPEC0"><
para>Interface stability</
para></
entry><
entry 10139N/Acolname="COLSPEC1"><
para>Evolving</
para></
entry></
row>
10139N/A<
refsect1 id="TIFFReadDirectory-3tiff-also"><
title>&also-tt;</
title>
10139N/A<!--Reference to another man page--> 10139N/A<!--Reference to a Help manual--> 10139N/A<
para><
citerefentry><
refentrytitle>libtiff</
refentrytitle><
manvolnum>3</
manvolnum>
10139N/A</
citerefentry>, <
citerefentry><
refentrytitle>TIFFOpen</
refentrytitle><
manvolnum>
10139N/A3tiff</
manvolnum></
citerefentry>, <
citerefentry><
refentrytitle>TIFFWriteDirectory
10139N/A</
refentrytitle><
manvolnum>3tiff</
manvolnum></
citerefentry>, <
citerefentry>
10139N/A<
refentrytitle>TIFFSetDirectory</
refentrytitle><
manvolnum>3tiff</
manvolnum>
10139N/A</
citerefentry>, <
citerefentry><
refentrytitle>TIFFSetSubDirectory</
refentrytitle>
10139N/A<
manvolnum>3tiff</
manvolnum></
citerefentry></
para>
10139N/A<
refsect1 id="TIFFReadDirectory-3tiff-note"><
title>¬e-tt;</
title>
10139N/A<
para>This man page was originally written by Sam Leffler. Updated by Breda McColgan, Sun Microsystems Inc., 2004.</
para>