1<!-- Creator     : groff version 1.19.2 -->
2<!-- CreationDate: Mon Jan  2 17:41:39 2006 -->
3<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
4"http://www.w3.org/TR/html4/loose.dtd">
5<html>
6<head>
7<meta name="generator" content="groff -Thtml, see www.gnu.org">
8<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
9<meta name="Content-Style" content="text/css">
10<style type="text/css">
11       p     { margin-top: 0; margin-bottom: 0; }
12       pre   { margin-top: 0; margin-bottom: 0; }
13       table { margin-top: 0; margin-bottom: 0; }
14</style>
15<title>TIFFReadDirectory</title>
16
17</head>
18<body>
19
20<h1 align=center>TIFFReadDirectory</h1>
21
22<a href="#NAME">NAME</a><br>
23<a href="#SYNOPSIS">SYNOPSIS</a><br>
24<a href="#DESCRIPTION">DESCRIPTION</a><br>
25<a href="#NOTES">NOTES</a><br>
26<a href="#RETURN VALUES">RETURN VALUES</a><br>
27<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
28<a href="#SEE ALSO">SEE ALSO</a><br>
29
30<hr>
31
32
33<a name="NAME"></a>
34<h2>NAME</h2>
35
36
37
38<p style="margin-left:11%; margin-top: 1em">TIFFReadDirectory
39&minus; get the contents of the next directory in an open
40<small>TIFF</small> file</p>
41
42<a name="SYNOPSIS"></a>
43<h2>SYNOPSIS</h2>
44
45
46<p style="margin-left:11%; margin-top: 1em"><b>#include
47&lt;tiffio.h&gt;</b></p>
48
49<p style="margin-left:11%; margin-top: 1em"><b>int
50TIFFReadDirectory(TIFF *</b><i>tif</i><b>)</b></p>
51
52<a name="DESCRIPTION"></a>
53<h2>DESCRIPTION</h2>
54
55
56<p style="margin-left:11%; margin-top: 1em">Read the next
57directory in the specified file and make it the current
58directory. Applications only need to call
59<i>TIFFReadDirectory</i> to read multiple subfiles in a
60single <small>TIFF</small> file&mdash; the first directory
61in a file is automatically read when <i>TIFFOpen</i> is
62called.</p>
63
64<a name="NOTES"></a>
65<h2>NOTES</h2>
66
67
68<p style="margin-left:11%; margin-top: 1em">If the library
69is compiled with <small>STRIPCHOP_SUPPORT</small> enabled,
70then images that have a single uncompressed strip or tile of
71data are automatically treated as if they were made up of
72multiple strips or tiles of approximately 8 kilobytes each.
73This operation is done only in-memory; it does not alter the
74contents of the file. However, the construction of the
75&lsquo;&lsquo;chopped strips&rsquo;&rsquo; is visible to the
76application through the number of strips [tiles] returned by
77<i>TIFFNumberOfStrips</i> [<i>TIFFNumberOfTiles</i>].</p>
78
79<a name="RETURN VALUES"></a>
80<h2>RETURN VALUES</h2>
81
82
83<p style="margin-left:11%; margin-top: 1em">If the next
84directory was successfully read, 1 is returned. Otherwise, 0
85is returned if an error was encountered, or if there are no
86more directories to be read.</p>
87
88<a name="DIAGNOSTICS"></a>
89<h2>DIAGNOSTICS</h2>
90
91
92<p style="margin-left:11%; margin-top: 1em">All error
93messages are directed to the <i>TIFFError</i>(3TIFF)
94routine. All warning messages are directed to the
95<i>TIFFWarning</i>(3TIFF) routine.</p>
96
97<p style="margin-left:11%; margin-top: 1em"><b>Seek error
98accessing TIFF directory</b>. An error occurred while
99positioning to the location of the directory.</p>
100
101<p style="margin-left:11%; margin-top: 1em"><b>Wrong data
102type %d for field &quot;%s&quot;</b>. The tag entry in the
103directory had an incorrect data type. For example, an
104<i>ImageDescription</i> tag with a <small>SHORT</small> data
105type.</p>
106
107<p style="margin-left:11%; margin-top: 1em"><b>TIFF
108directory is missing required &quot;%s&quot; field</b>. The
109specified tag is required to be present by the
110<small>TIFF</small> 5.0 specification, but is missing. The
111directory is (usually) unusable.</p>
112
113<p style="margin-left:11%; margin-top: 1em"><b>%s: Rational
114with zero denominator</b>. A directory tag has a
115<small>RATIONAL</small> value whose denominator is zero.</p>
116
117<p style="margin-left:11%; margin-top: 1em"><b>Incorrect
118count %d for field &quot;%s&quot; (%lu, expecting %lu); tag
119ignored</b>. The specified tag&rsquo;s count field is bad.
120For example, a count other than 1 for a <i>SubFileType</i>
121tag.</p>
122
123<p style="margin-left:11%; margin-top: 1em"><b>Cannot
124handle different per-sample values for field
125&quot;%s&quot;</b>. The tag has <i>SamplesPerPixel</i>
126values and they are not all the same; e.g.
127<i>BitsPerSample</i>. The library is unable to handle images
128of this sort.</p>
129
130<p style="margin-left:11%; margin-top: 1em"><b>Count
131mismatch for field &quot;%s&quot;; expecting %d, got %d</b>.
132The count field in a tag does not agree with the number
133expected by the library. This should never happen, so if it
134does, the library refuses to read the directory.</p>
135
136<p style="margin-left:11%; margin-top: 1em"><b>Invalid TIFF
137directory; tags are not sorted in ascending order</b>. The
138directory tags are not properly sorted as specified in the
139<small>TIFF</small> 5.0 specification. This error is not
140fatal.</p>
141
142<p style="margin-left:11%; margin-top: 1em"><b>Ignoring
143unknown field with tag %d (0x%x)</b>. An unknown tag was
144encountered in the directory; the library ignores all such
145tags.</p>
146
147<p style="margin-left:11%; margin-top: 1em"><b>TIFF
148directory is missing requred &quot;ImageLength&quot;
149field</b>. The image violates the specification by not
150having a necessary field. There is no way for the library to
151recover from this error.</p>
152
153<p style="margin-left:11%; margin-top: 1em"><b>TIFF
154directory is missing requred &quot;PlanarConfig&quot;
155field</b>. The image violates the specification by not
156having a necessary field. There is no way for the library to
157recover from this error.</p>
158
159<p style="margin-left:11%; margin-top: 1em"><b>TIFF
160directory is missing requred &quot;StripOffsets&quot;
161field</b>. The image has multiple strips, but is missing the
162tag that specifies the file offset to each strip of data.
163There is no way for the library to recover from this
164error.</p>
165
166<p style="margin-left:11%; margin-top: 1em"><b>TIFF
167directory is missing requred &quot;TileOffsets&quot;
168field</b>. The image has multiple tiles, but is missing the
169tag that specifies the file offset to each tile of data.
170There is no way for the library to recover from this
171error.</p>
172
173<p style="margin-left:11%; margin-top: 1em"><b>TIFF
174directory is missing required &quot;StripByteCounts&quot;
175field</b>. The image has multiple strips, but is missing the
176tag that specifies the size of each strip of data. There is
177no way for the library to recover from this error.</p>
178
179<p style="margin-left:11%; margin-top: 1em"><b>TIFF
180directory is missing required &quot;StripByteCounts&quot;
181field, calculating from imagelength</b>. The image violates
182the specification by not having a necessary field. However,
183when the image is comprised of only one strip or tile, the
184library will estimate the missing value based on the file
185size.</p>
186
187<p style="margin-left:11%; margin-top: 1em"><b>Bogus
188&quot;StripByteCounts&quot; field, ignoring and calculating
189from imagelength</b>. Certain vendors violate the
190specification by writing zero for the StripByteCounts tag
191when they want to leave the value unspecified. If the image
192has a single strip, the library will estimate the missing
193value based on the file size.</p>
194
195<a name="SEE ALSO"></a>
196<h2>SEE ALSO</h2>
197
198
199
200<p style="margin-left:11%; margin-top: 1em"><b>TIFFOpen</b>(3TIFF),
201<b>TIFFWriteDirectory</b>(3TIFF),
202<b>TIFFSetDirectory</b>(3TIFF),
203<b>TIFFSetSubDirectory</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
204
205<p style="margin-left:11%; margin-top: 1em">Libtiff library
206home page: <b>http://www.remotesensing.org/libtiff/</b></p>
207<hr>
208</body>
209</html>
210