1 <!-- Creator : groff version 1.18.1 -->
2 <!-- CreationDate: Mon Mar 13 18:03:10 2006 -->
5 <meta name="generator" content="groff -Thtml, see www.gnu.org">
6 <meta name="Content-Style" content="text/css">
7 <title>TIFFSetDirectory</title>
11 <h1 align=center>TIFFSetDirectory</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>
23 <table width="100%" border=0 rules="none" frame="void"
24 cols="2" cellspacing="0" cellpadding="0">
25 <tr valign="top" align="left">
28 <p>TIFFSetDirectory, TIFFSetSubDirectory − set the
29 current directory for an open <small>TIFF</small> file</p>
32 <a name="SYNOPSIS"></a>
35 <table width="100%" border=0 rules="none" frame="void"
36 cols="2" cellspacing="0" cellpadding="0">
37 <tr valign="top" align="left">
40 <p><b>#include <tiffio.h></b></p>
42 <p><b>int TIFFSetDirectory(TIFF *</b><i>tif</i><b>,
43 tdir_t</b> <i>dirnum</i><b>)<br>
44 int TIFFSetSubDirectory(TIFF *</b><i>tif</i><b>, uint32</b>
45 <i>diroff</i><b>)</b></p>
48 <a name="DESCRIPTION"></a>
51 <table width="100%" border=0 rules="none" frame="void"
52 cols="2" cellspacing="0" cellpadding="0">
53 <tr valign="top" align="left">
56 <p><i>TIFFSetDirectory</i> changes the current directory and
57 reads its contents with <i>TIFFReadDirectory</i>. The
58 parameter <i>dirnum</i> specifies the subfile/directory as
59 an integer number, with the first directory numbered
62 <p><i>TIFFSetSubDirectory</i> acts like
63 <i>TIFFSetDirectory</i>, except the directory is specified
64 as a file offset instead of an index; this is required for
65 accessing subdirectories linked through a <i>SubIFD</i>
69 <a name="RETURN VALUES"></a>
70 <h2>RETURN VALUES</h2>
72 <table width="100%" border=0 rules="none" frame="void"
73 cols="2" cellspacing="0" cellpadding="0">
74 <tr valign="top" align="left">
77 <p>On successful return 1 is returned. Otherwise, 0 is
78 returned if <i>dirnum</i> or <i>diroff</i> specifies a
79 non-existent directory, or if an error was encountered while
80 reading the directory’s contents.</p>
83 <a name="DIAGNOSTICS"></a>
86 <table width="100%" border=0 rules="none" frame="void"
87 cols="2" cellspacing="0" cellpadding="0">
88 <tr valign="top" align="left">
91 <p>All error messages are directed to the
92 <i>TIFFError</i>(3TIFF) routine.</p>
94 <p><b>%s: Error fetching directory count</b>. An error was
95 encountered while reading the ‘‘directory
96 count’’ field.</p>
98 <p><b>%s: Error fetching directory link</b>. An error was
99 encountered while reading the ‘‘link
100 value’’ that points to the next directory in a
104 <a name="SEE ALSO"></a>
107 <table width="100%" border=0 rules="none" frame="void"
108 cols="2" cellspacing="0" cellpadding="0">
109 <tr valign="top" align="left">
112 <p><i>TIFFCurrentDirectory</i>(3TIFF),
113 <i>TIFFOpen</i>(3TIFF), <i>TIFFReadDirectory</i>(3TIFF),
114 <i>TIFFWriteDirectory</i>(3TIFF), <i>libtiff</i>(3TIFF)</p>
116 <p>Libtiff library home page:
117 <b>http://www.remotesensing.org/libtiff/</b></p>