1<!-- Creator     : groff version 1.19.2 -->
2<!-- CreationDate: Mon Jan  2 17:41:44 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>TIFFSetDirectory</title>
16
17</head>
18<body>
19
20<h1 align=center>TIFFSetDirectory</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="#RETURN VALUES">RETURN VALUES</a><br>
26<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
27<a href="#SEE ALSO">SEE ALSO</a><br>
28
29<hr>
30
31
32<a name="NAME"></a>
33<h2>NAME</h2>
34
35
36
37<p style="margin-left:11%; margin-top: 1em">TIFFSetDirectory,
38TIFFSetSubDirectory &minus; set the current directory for an
39open <small>TIFF</small> file</p>
40
41<a name="SYNOPSIS"></a>
42<h2>SYNOPSIS</h2>
43
44
45<p style="margin-left:11%; margin-top: 1em"><b>#include
46&lt;tiffio.h&gt;</b></p>
47
48<p style="margin-left:11%; margin-top: 1em"><b>int
49TIFFSetDirectory(TIFF *</b><i>tif</i><b>, tdir_t</b>
50<i>dirnum</i><b>) <br>
51int TIFFSetSubDirectory(TIFF *</b><i>tif</i><b>, uint32</b>
52<i>diroff</i><b>)</b></p>
53
54<a name="DESCRIPTION"></a>
55<h2>DESCRIPTION</h2>
56
57
58
59<p style="margin-left:11%; margin-top: 1em"><i>TIFFSetDirectory</i>
60changes the current directory and reads its contents with
61<i>TIFFReadDirectory</i>. The parameter <i>dirnum</i>
62specifies the subfile/directory as an integer number, with
63the first directory numbered zero.</p>
64
65
66<p style="margin-left:11%; margin-top: 1em"><i>TIFFSetSubDirectory</i>
67acts like <i>TIFFSetDirectory</i>, except the directory is
68specified as a file offset instead of an index; this is
69required for accessing subdirectories linked through a
70<i>SubIFD</i> tag.</p>
71
72<a name="RETURN VALUES"></a>
73<h2>RETURN VALUES</h2>
74
75
76<p style="margin-left:11%; margin-top: 1em">On successful
77return 1 is returned. Otherwise, 0 is returned if
78<i>dirnum</i> or <i>diroff</i> specifies a non-existent
79directory, or if an error was encountered while reading the
80directory&rsquo;s contents.</p>
81
82<a name="DIAGNOSTICS"></a>
83<h2>DIAGNOSTICS</h2>
84
85
86<p style="margin-left:11%; margin-top: 1em">All error
87messages are directed to the <i>TIFFError</i>(3TIFF)
88routine.</p>
89
90<p style="margin-left:11%; margin-top: 1em"><b>%s: Error
91fetching directory count</b>. An error was encountered while
92reading the &lsquo;&lsquo;directory count&rsquo;&rsquo;
93field.</p>
94
95<p style="margin-left:11%; margin-top: 1em"><b>%s: Error
96fetching directory link</b>. An error was encountered while
97reading the &lsquo;&lsquo;link value&rsquo;&rsquo; that
98points to the next directory in a file.</p>
99
100<a name="SEE ALSO"></a>
101<h2>SEE ALSO</h2>
102
103
104
105<p style="margin-left:11%; margin-top: 1em"><i>TIFFCurrentDirectory</i>(3TIFF),
106<i>TIFFOpen</i>(3TIFF), <i>TIFFReadDirectory</i>(3TIFF),
107<i>TIFFWriteDirectory</i>(3TIFF), <i>libtiff</i>(3TIFF)</p>
108
109<p style="margin-left:11%; margin-top: 1em">Libtiff library
110home page: <b>http://www.remotesensing.org/libtiff/</b></p>
111<hr>
112</body>
113</html>
114