<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
<!--ArborText, Inc., 1988-1999, v.4002-->
<!--ARC : LSARC 2003/085 libtiff, libjpeg, and libpng-->
<!ENTITY synp-tt "SYNOPSIS">
<!ENTITY cmd "TIFFSetDirectory">
<!ENTITY % commonents SYSTEM "smancommon.ent">
%commonents;
<!ENTITY % gnomecommonents SYSTEM "gnomecommon.ent">
%gnomecommonents;
<!ENTITY % booktitles SYSTEM "booktitles.ent">
%booktitles;
<!ENTITY suncopy "Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.">
]>
<?Pub UDT _bookmark _target>
<?Pub Inc>
<?PubInc>
<refentry id="TIFFSetDirectory-3tiff">
<!-- %Z%%M% %I% %E% SMI; -->
<refmeta><refentrytitle>TIFFSetDirectory</refentrytitle><manvolnum>3tiff</manvolnum>
<refmiscinfo class="date">05 Apr 2004</refmiscinfo>
<refmiscinfo class="sectdesc">&man3;</refmiscinfo>
<refmiscinfo class="software">&release;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">&suncopy;</refmiscinfo>
</refmeta>
<indexterm><primary>TIFFSetDirectory</primary></indexterm><indexterm><primary>
set the current directory for an open TIFF file</primary></indexterm>
<refnamediv id="TIFFSetDirectory-3tiff-name"><refname>TIFFSetDirectory</refname>
<refname>TIFFSetSubDirectory</refname><refpurpose>set the current directory
for an open TIFF file</refpurpose></refnamediv>
<refsect1 id="TIFFSetDirectory-3tiff-synp"><title>&synp-tt;</title>
<programlisting>#include &lt;tiffio.h>
int TIFFSetDirectory(TIFF* tif, tdir_t dirnum)
int TIFFSetSubDirectory(TIFF* tif, uint32 diroff)</programlisting>
</refsect1>
<refsect1 id="TIFFSetDirectory-3tiff-desc"><title>&desc-tt;</title>
<para><literal>TIFFSetDirectory</literal> changes the current directory and
reads the directory contents with <literal>TIFFReadDirectory</literal>. The
parameter <literal>dirnum</literal> specifies the subfile/directory as an
integer number, with the first directory numbered zero.</para>
<para><literal>TIFFSetSubDirectory</literal> acts like <literal>TIFFSetDirectory
</literal>, except that the directory is specified as a file offset instead
of an index. This is required for accessing subdirectories linked through
a <literal>SubIFD</literal> tag.</para>
</refsect1>
<refsect1 id="TIFFSetDirectory-3tiff-exde"><title>&exde-tt;</title>
<refsect2 id="TIFFSetDirectory-3tiff-exde-diags">
<title>Diagnostics</title>
<para>All error messages are directed to the <literal>TIFFError(3tiff)</literal>
routine.</para>
<variablelist>
<varlistentry><term>%s: Error fetching directory count.</term><listitem><para>
An error was encountered while reading the &ldquo;directory count&rdquo; field.
</para>
</listitem></varlistentry>
<varlistentry><term>%s: Error fetching directory link.</term><listitem><para>
An error was encountered while reading the &ldquo;link value&rdquo; that points
to the next directory in a file.</para>
</listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
<refsect1 id="TIFFSetDirectory-3tiff-rtrn"><title>&rtrn-tt;</title>
<para>On successful completion, 1 is returned. Otherwise, 0 is returned if <literal>
dirnum</literal> or <literal>diroff</literal> specifies a non-existent directory,
or if an error was encountered while reading the directory contents.</para>
</refsect1>
<refsect1 id="TIFFSetDirectory-3tiff-attr"><title>&attr-tt;</title>
<para>See <olink targetdocent="REFMAN5" localinfo="attributes-5"><citerefentry>
<refentrytitle>attributes</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink>
for descriptions of the following attributes:</para>
<informaltable frame="all">
<tgroup cols="2" colsep="1" rowsep="1"><colspec colname="COLSPEC0" colwidth="1*">
<colspec colname="COLSPEC1" colwidth="1*">
<thead>
<row><entry align="center" valign="middle">ATTRIBUTE TYPE</entry><entry align="center"
valign="middle">ATTRIBUTE VALUE</entry></row>
</thead>
<tbody>
<row><entry><para>Availability</para></entry><entry><para>image/library/libtiff</para></entry>
</row>
<row><entry colname="COLSPEC0"><para>Interface stability</para></entry><entry
colname="COLSPEC1"><para>Uncommitted</para></entry></row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="TIFFSetDirectory-3tiff-also"><title>&also-tt;</title>
<!--Reference to another man page-->
<!--Reference to a Help manual-->
<!--Reference to a book.-->
<para><citerefentry><refentrytitle>libtiff</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>, <citerefentry><refentrytitle>TIFFCurrent<?Pub Caret>Directory
</refentrytitle><manvolnum>3tiff</manvolnum></citerefentry>, <citerefentry>
<refentrytitle>TIFFOpen</refentrytitle><manvolnum>3tiff</manvolnum></citerefentry>, <citerefentry>
<refentrytitle>TIFFReadDirectory</refentrytitle><manvolnum>3tiff</manvolnum>
</citerefentry>, <citerefentry><refentrytitle>TIFFWriteDirectory</refentrytitle>
<manvolnum>3tiff</manvolnum></citerefentry></para>
</refsect1>
<refsect1 id="TIFFSetDirectory-3tiff-note"><title>&note-tt;</title>
<para>This man page was originally written by Sam Leffler. Updated by Breda
McColgan, Sun Microsystems Inc., 2004.</para>
</refsect1>
</refentry>
<?Pub *0000005044>
