]> git.saurik.com Git - wxWidgets.git/blame - src/tiff/man/TIFFReadDirectory.3tiff
Second part of #15224 fix: AddRows, AddColumns (dghart)
[wxWidgets.git] / src / tiff / man / TIFFReadDirectory.3tiff
CommitLineData
8414a40c
VZ
1.\"
2.\" Copyright (c) 1988-1997 Sam Leffler
3.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
4.\"
5.\" Permission to use, copy, modify, distribute, and sell this software and
6.\" its documentation for any purpose is hereby granted without fee, provided
7.\" that (i) the above copyright notices and this permission notice appear in
8.\" all copies of the software and related documentation, and (ii) the names of
9.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
10.\" publicity relating to the software without the specific, prior written
11.\" permission of Sam Leffler and Silicon Graphics.
12.\"
13.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
14.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
15.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
16.\"
17.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
18.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
19.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
21.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22.\" OF THIS SOFTWARE.
23.\"
24.if n .po 0
25.TH TIFFReadDirectory 3TIFF "October 15, 1995" "libtiff"
26.SH NAME
27TIFFReadDirectory \- get the contents of the next directory in an open
28.SM TIFF
29file
30.SH SYNOPSIS
31.B "#include <tiffio.h>"
32.sp
33.BI "int TIFFReadDirectory(TIFF *" tif ")"
34.SH DESCRIPTION
35Read the next directory in the specified file and make it the current
36directory. Applications only need to call
37.I TIFFReadDirectory
38to read multiple subfiles in a single
39.SM TIFF
40file\(em
41the first directory in a file is automatically read when
42.IR TIFFOpen
43is called.
44.SH NOTES
45If the library is compiled with
46.SM STRIPCHOP_SUPPORT
47enabled, then images that have a single uncompressed strip or tile of data are
48automatically treated as if they were made up of multiple strips or tiles of
49approximately 8 kilobytes each. This operation is done only in-memory; it does
50not alter the contents of the file. However, the construction of the ``chopped
51strips'' is visible to the application through the number of strips [tiles]
52returned by
53.I TIFFNumberOfStrips
54[\c
55.IR TIFFNumberOfTiles ].
56.SH "RETURN VALUES"
57If the next directory was successfully read, 1 is returned. Otherwise, 0 is
58returned if an error was encountered, or if there are no more directories to
59be read.
60.SH DIAGNOSTICS
61All error messages are directed to the
62.IR TIFFError (3TIFF)
63routine.
64All warning messages are directed to the
65.IR TIFFWarning (3TIFF)
66routine.
67.PP
68\fBSeek error accessing TIFF directory\fP.
69An error occurred while positioning to the location of the
70directory.
71.PP
72\fBWrong data type %d for field "%s"\fP.
73The tag entry in the directory had an incorrect data type.
74For example, an
75.I ImageDescription
76tag with a
77.SM SHORT
78data type.
79.PP
80\fBTIFF directory is missing required "%s" field\fP.
81The specified tag is required to be present by the
82.SM TIFF
835.0 specification, but is missing.
84The directory is (usually) unusable.
85.PP
86\fB%s: Rational with zero denominator\fP.
87A directory tag has a
88.SM RATIONAL
89value whose denominator is zero.
90.PP
91\fBIncorrect count %d for field "%s" (%lu, expecting %lu); tag ignored\fP.
92The specified tag's count field is bad.
93For example, a count other than 1 for a
94.I SubFileType
95tag.
96.PP
97\fBCannot handle different per-sample values for field "%s"\fP.
98The tag has
99.I SamplesPerPixel
100values and they are not all the same; e.g.
101.IR BitsPerSample .
102The library is unable to handle images of this sort.
103.PP
104\fBCount mismatch for field "%s"; expecting %d, got %d\fP.
105The count field in a
106tag does not agree with the number expected by the library.
107This should never happen, so if it does, the library refuses to
108read the directory.
109.PP
110\fBInvalid TIFF directory; tags are not sorted in ascending order\fP.
111The directory tags are not properly sorted as specified
112in the
113.SM TIFF
1145.0 specification.
115This error is not fatal.
116.PP
117\fBIgnoring unknown field with tag %d (0x%x)\fP.
118An unknown tag was encountered in the directory;
119the library ignores all such tags.
120.PP
80ed523f 121\fBTIFF directory is missing required "ImageLength" field\fP.
8414a40c
VZ
122The image violates the specification by not having a necessary field.
123There is no way for the library to recover from this error.
124.PP
80ed523f 125\fBTIFF directory is missing required "PlanarConfig" field\fP.
8414a40c
VZ
126The image violates the specification by not having a necessary field.
127There is no way for the library to recover from this error.
128.PP
80ed523f 129\fBTIFF directory is missing required "StripOffsets" field\fP.
8414a40c
VZ
130The image has multiple strips, but is missing the tag that
131specifies the file offset to each strip of data.
132There is no way for the library to recover from this error.
133.PP
80ed523f 134\fBTIFF directory is missing required "TileOffsets" field\fP.
8414a40c
VZ
135The image has multiple tiles, but is missing the tag that
136specifies the file offset to each tile of data.
137There is no way for the library to recover from this error.
138.PP
139\fBTIFF directory is missing required "StripByteCounts" field\fP.
140The image has multiple strips, but is missing the tag that
141specifies the size of each strip of data.
142There is no way for the library to recover from this error.
143.PP
144\fBTIFF directory is missing required "StripByteCounts" field, calculating from imagelength\fP.
145The image violates the specification by not having a necessary field.
146However, when the image is comprised of only one strip or tile, the
147library will estimate the missing value based on the file size.
148.PP
149\fBBogus "StripByteCounts" field, ignoring and calculating from imagelength\fP.
150Certain vendors violate the specification by writing zero for
151the StripByteCounts tag when they want to leave the value
152unspecified.
153If the image has a single strip, the library will estimate
154the missing value based on the file size.
155.SH "SEE ALSO"
156.BR TIFFOpen (3TIFF),
157.BR TIFFWriteDirectory (3TIFF),
158.BR TIFFSetDirectory (3TIFF),
159.BR TIFFSetSubDirectory (3TIFF),
160.BR libtiff (3TIFF)
161.PP
162Libtiff library home page:
163.BR http://www.remotesensing.org/libtiff/