]> git.saurik.com Git - wxWidgets.git/blame - src/tiff/html/man/TIFFWriteDirectory.3tiff.html
Merged libtiff 4.0.3 changes into the trunk.
[wxWidgets.git] / src / tiff / html / man / TIFFWriteDirectory.3tiff.html
CommitLineData
8414a40c 1<!-- Creator : groff version 1.18.1 -->
80ed523f 2<!-- CreationDate: Sat Feb 24 18:37:18 2007 -->
8414a40c
VZ
3<html>
4<head>
5<meta name="generator" content="groff -Thtml, see www.gnu.org">
6<meta name="Content-Style" content="text/css">
7<title>TIFFWriteDirectory</title>
8</head>
9<body>
10
11<h1 align=center>TIFFWriteDirectory</h1>
12<a href="#NAME">NAME</a><br>
13<a href="#SYNOPSIS">SYNOPSIS</a><br>
14<a href="#DESCRIPTION">DESCRIPTION</a><br>
15<a href="#RETURN VALUES">RETURN VALUES</a><br>
16<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
17<a href="#SEE ALSO">SEE ALSO</a><br>
18
19<hr>
20<a name="NAME"></a>
21<h2>NAME</h2>
22<!-- INDENTATION -->
23<table width="100%" border=0 rules="none" frame="void"
24 cols="2" cellspacing="0" cellpadding="0">
25<tr valign="top" align="left">
26<td width="8%"></td>
27<td width="91%">
28<p>TIFFWriteDirectory, TIFFRewriteDirectory,
29TIFFCheckpointDirectory &minus; write the current directory
30in an open <small>TIFF</small> file</p>
31</td>
32</table>
33<a name="SYNOPSIS"></a>
34<h2>SYNOPSIS</h2>
35<!-- INDENTATION -->
36<table width="100%" border=0 rules="none" frame="void"
37 cols="2" cellspacing="0" cellpadding="0">
38<tr valign="top" align="left">
39<td width="8%"></td>
40<td width="91%">
41<p><b>#include &lt;tiffio.h&gt;</b></p>
42<!-- INDENTATION -->
43<p><b>int TIFFWriteDirectory(TIFF *</b><i>tif</i><b>)<br>
44int TIFFRewriteDirectory(TIFF *</b><i>tif</i><b>)<br>
45int TIFFCheckpointDirectory(TIFF *</b><i>tif</i><b>)</b></p>
46</td>
47</table>
48<a name="DESCRIPTION"></a>
49<h2>DESCRIPTION</h2>
50<!-- INDENTATION -->
51<table width="100%" border=0 rules="none" frame="void"
52 cols="2" cellspacing="0" cellpadding="0">
53<tr valign="top" align="left">
54<td width="8%"></td>
55<td width="91%">
56<p><i>TIFFWriteDirectory</i> will write the contents of the
57current directory to the file and setup to create a new
58subfile in the same file. Applications only need to call
59<i>TIFFWriteDirectory</i> when writing multiple subfiles to
60a single <small>TIFF</small> file. <i>TIFFWriteDirectory</i>
61is automatically called by <i>TIFFClose</i> and
62<i>TIFFFlush</i> to write a modified directory if the file
63is open for writing.</p>
64<!-- INDENTATION -->
65<p>The <i>TIFFRewriteDirectory</i> function operates
66similarly to <i>TIFFWriteDirectory,</i> but can be called
67with directories previously read or written that already
68have an established location in the file. It will rewrite
69the directory, but instead of place it at it&rsquo;s old
70location (as <i>TIFFWriteDirectory</i> would) it will place
71them at the end of the file, correcting the pointer from the
72preceeding directory or file header to point to it&rsquo;s
73new location. This is particularly important in cases where
74the size of the directory and pointed to data has grown, so
75it won&rsquo;t fit in the space available at the old
76location.</p>
77<!-- INDENTATION -->
78<p>The <i>TIFFCheckpointDirectory</i> writes the current
79state of the tiff directory into the file to make what is
80currently in the file readable. Unlike
81<i>TIFFWriteDirectory, TIFFCheckpointDirectory</i> does not
82free up the directory data structures in memory, so they can
83be updated (as strips/tiles are written) and written again.
84Reading such a partial file you will at worst get a tiff
85read error for the first strip/tile encountered that is
86incomplete, but you will at least get all the valid data in
87the file before that. When the file is complete, just use
88<i>TIFFWriteDirectory</i> as usual to finish it off
89cleanly.</p>
90</td>
91</table>
92<a name="RETURN VALUES"></a>
93<h2>RETURN VALUES</h2>
94<!-- INDENTATION -->
95<table width="100%" border=0 rules="none" frame="void"
96 cols="2" cellspacing="0" cellpadding="0">
97<tr valign="top" align="left">
98<td width="8%"></td>
99<td width="91%">
100<p>1 is returned when the contents are successfully written
101to the file. Otherwise, 0 is returned if an error was
102encountered when writing the directory contents.</p>
103</td>
104</table>
105<a name="DIAGNOSTICS"></a>
106<h2>DIAGNOSTICS</h2>
107<!-- INDENTATION -->
108<table width="100%" border=0 rules="none" frame="void"
109 cols="2" cellspacing="0" cellpadding="0">
110<tr valign="top" align="left">
111<td width="8%"></td>
112<td width="91%">
113<p>All error messages are directed to the
114<i>TIFFError</i>(3TIFF) routine.</p>
115<!-- INDENTATION -->
116<p><b>Error post-encoding before directory write</b>. Before
117writing the contents of the current directory, any pending
118data are flushed. This message indicates that an error
119occurred while doing this.</p>
120<!-- INDENTATION -->
121<p><b>Error flushing data before directory write</b>. Before
122writing the contents of the current directory, any pending
123data are flushed. This message indicates that an error
124occurred while doing this.</p>
125<!-- INDENTATION -->
126<p><b>Cannot write directory, out of space</b>. There was
127not enough space to allocate a temporary area for the
128directory that was to be written.</p>
129<!-- INDENTATION -->
130<p><b>Error writing directory count</b>. A write error
131occurred when writing the count of fields in the
132directory.</p>
133<!-- INDENTATION -->
134<p><b>Error writing directory contents</b>. A write error
135occurred when writing the directory fields.</p>
136<!-- INDENTATION -->
137<p><b>Error writing directory link</b>. A write error
138occurred when writing the link to the next directory.</p>
139<!-- INDENTATION -->
140<p><b>Error writing data for field &quot;%s&quot;</b>. A
141write error occurred when writing indirect data for the
142specified field.</p>
143<!-- INDENTATION -->
144<p><b>Error writing TIFF header</b>. A write error occurred
145when re-writing header at the front of the file.</p>
146<!-- INDENTATION -->
147<p><b>Error fetching directory count</b>. A read error
148occurred when fetching the directory count field for a
149previous directory. This can occur when setting up a link to
150the directory that is being written.</p>
151<!-- INDENTATION -->
152<p><b>Error fetching directory link</b>. A read error
153occurred when fetching the directory link field for a
154previous directory. This can occur when setting up a link to
155the directory that is being written.</p>
156</td>
157</table>
158<a name="SEE ALSO"></a>
159<h2>SEE ALSO</h2>
160<!-- INDENTATION -->
161<table width="100%" border=0 rules="none" frame="void"
162 cols="2" cellspacing="0" cellpadding="0">
163<tr valign="top" align="left">
164<td width="8%"></td>
165<td width="91%">
166<p><b>TIFFOpen</b>(3TIFF), <b>TIFFError</b>(3TIFF),
167<b>TIFFReadDirectory</b>(3TIFF),
168<b>TIFFSetDirectory</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
169<!-- INDENTATION -->
170<p>Libtiff library home page:
171<b>http://www.remotesensing.org/libtiff/</b></p>
172</td>
173</table>
174<hr>
175</body>
176</html>