|
1 <!-- Creator : groff version 1.18.1 --> |
|
2 <!-- CreationDate: Mon Mar 13 18:03:11 2006 --> |
|
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, |
|
29 TIFFCheckpointDirectory − write the current directory |
|
30 in 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 <tiffio.h></b></p> |
|
42 <!-- INDENTATION --> |
|
43 <p><b>int TIFFWriteDirectory(TIFF *</b><i>tif</i><b>)<br> |
|
44 int TIFFRewriteDirectory(TIFF *</b><i>tif</i><b>)<br> |
|
45 int 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 |
|
57 current directory to the file and setup to create a new |
|
58 subfile in the same file. Applications only need to call |
|
59 <i>TIFFWriteDirectory</i> when writing multiple subfiles to |
|
60 a single <small>TIFF</small> file. <i>TIFFWriteDirectory</i> |
|
61 is automatically called by <i>TIFFClose</i> and |
|
62 <i>TIFFFlush</i> to write a modified directory if the file |
|
63 is open for writing.</p> |
|
64 <!-- INDENTATION --> |
|
65 <p>The <i>TIFFRewriteDirectory</i> function operates |
|
66 similarly to <i>TIFFWriteDirectory,</i> but can be called |
|
67 with directories previously read or written that already |
|
68 have an established location in the file. It will rewrite |
|
69 the directory, but instead of place it at it’s old |
|
70 location (as <i>TIFFWriteDirectory</i> would) it will place |
|
71 them at the end of the file, correcting the pointer from the |
|
72 preceeding directory or file header to point to it’s |
|
73 new location. This is particularly important in cases where |
|
74 the size of the directory and pointed to data has grown, so |
|
75 it won’t fit in the space available at the old |
|
76 location.</p> |
|
77 <!-- INDENTATION --> |
|
78 <p>The <i>TIFFCheckpointDirectory</i> writes the current |
|
79 state of the tiff directory into the file to make what is |
|
80 currently in the file readable. Unlike |
|
81 <i>TIFFWriteDirectory, TIFFCheckpointDirectory</i> does not |
|
82 free up the directory data structures in memory, so they can |
|
83 be updated (as strips/tiles are written) and written again. |
|
84 Reading such a partial file you will at worst get a tiff |
|
85 read error for the first strip/tile encountered that is |
|
86 incomplete, but you will at least get all the valid data in |
|
87 the file before that. When the file is complete, just use |
|
88 <i>TIFFWriteDirectory</i> as usual to finish it off |
|
89 cleanly.</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 |
|
101 to the file. Otherwise, 0 is returned if an error was |
|
102 encountered 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 |
|
117 writing the contents of the current directory, any pending |
|
118 data are flushed. This message indicates that an error |
|
119 occurred while doing this.</p> |
|
120 <!-- INDENTATION --> |
|
121 <p><b>Error flushing data before directory write</b>. Before |
|
122 writing the contents of the current directory, any pending |
|
123 data are flushed. This message indicates that an error |
|
124 occurred while doing this.</p> |
|
125 <!-- INDENTATION --> |
|
126 <p><b>Cannot write directory, out of space</b>. There was |
|
127 not enough space to allocate a temporary area for the |
|
128 directory that was to be written.</p> |
|
129 <!-- INDENTATION --> |
|
130 <p><b>Error writing directory count</b>. A write error |
|
131 occurred when writing the count of fields in the |
|
132 directory.</p> |
|
133 <!-- INDENTATION --> |
|
134 <p><b>Error writing directory contents</b>. A write error |
|
135 occurred when writing the directory fields.</p> |
|
136 <!-- INDENTATION --> |
|
137 <p><b>Error writing directory link</b>. A write error |
|
138 occurred when writing the link to the next directory.</p> |
|
139 <!-- INDENTATION --> |
|
140 <p><b>Error writing data for field "%s"</b>. A |
|
141 write error occurred when writing indirect data for the |
|
142 specified field.</p> |
|
143 <!-- INDENTATION --> |
|
144 <p><b>Error writing TIFF header</b>. A write error occurred |
|
145 when re-writing header at the front of the file.</p> |
|
146 <!-- INDENTATION --> |
|
147 <p><b>Error fetching directory count</b>. A read error |
|
148 occurred when fetching the directory count field for a |
|
149 previous directory. This can occur when setting up a link to |
|
150 the directory that is being written.</p> |
|
151 <!-- INDENTATION --> |
|
152 <p><b>Error fetching directory link</b>. A read error |
|
153 occurred when fetching the directory link field for a |
|
154 previous directory. This can occur when setting up a link to |
|
155 the 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> |