<!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 "TIFFWriteDirectory">
<!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="TIFFWriteDirectory-3tiff">
<!-- %Z%%M% %I% %E% SMI; -->
<refmeta><refentrytitle>TIFFWriteDirectory</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>TIFFWriteDirectory</primary></indexterm><indexterm><primary>
write the current directory in an open TIFF file</primary></indexterm>
<refnamediv id="TIFFWriteDirectory-3tiff-name"><refname>TIFFWriteDirectory
</refname><refpurpose>write the current directory in an open TIFF file</refpurpose>
</refnamediv>
<refsect1 id="TIFFWriteDirectory-3tiff-synp"><title>&synp-tt;</title>
<programlisting>#include &lt;tiffio.h>
int TIFFWriteDirectory(TIFF* tif)</programlisting>
</refsect1>
<refsect1 id="TIFFWriteDirectory-3tiff-desc"><title>&desc-tt;</title>
<para>Write the contents of the current directory to the file and set up to
create a new subfile in the same file. Applications only need to call <literal>
TIFFWriteDirectory</literal> when writing multiple subfiles to a single TIFF
file. <literal>TIFFWriteDirectory</literal> is automatically called by <literal>
TIFFClose</literal> and <literal>TIFFFlush</literal> to write a modified directory
if the file is open for writing.</para>
</refsect1>
<refsect1 id="TIFFWriteDirectory-3tiff-exde"><title>&exde-tt;</title>
<refsect2 id="TIFFWriteDirectory-3tiff-exde-diags">
<title>Diagnostics</title>
<para>All error messages are directed to the <literal>TIFFError(3tiff)</literal>
routine.</para>
<variablelist>
<varlistentry><term>Error post-encoding before directory write.</term><listitem>
<para>Before writing the contents of the current directory, any pending data
is flushed. This message indicates that an error occurred while doing this.
</para>
</listitem></varlistentry>
<varlistentry><term>Error flushing data before directory write.</term><listitem>
<para>Before writing the contents of the current directory, any pending data
is flushed. This message indicates that an error occurred while doing this.
</para>
</listitem></varlistentry>
<varlistentry><term>Cannot write directory, out of space.</term><listitem>
<para>There was not enough space to allocate a temporary area for the directory
that was to be written.</para>
</listitem></varlistentry>
<varlistentry><term>Error writing directory count.</term><listitem><para>
A write error occurred when writing the count of fields in the directory.
</para>
</listitem></varlistentry>
<varlistentry><term>Error writing directory contents.</term><listitem><para>
A write error occurred when writing the directory fields.</para>
</listitem></varlistentry>
<varlistentry><term>Error writing directory link.</term><listitem><para>A
write error occurred when writing the link to the next directory.</para>
</listitem></varlistentry>
<varlistentry><term>Error writing data for field "%s".</term><listitem><para>
A write error occurred when writing indirect data for the specified field.
</para>
</listitem></varlistentry>
<varlistentry><term>Error writing TIFF header.</term><listitem><para>A write
error occurred when rewriting header at the front of the file.</para>
</listitem></varlistentry>
<varlistentry><term>Error fetching directory count.</term><listitem><para>
A read error occurred when fetching the directory count field for a previous
directory. This can occur when setting up a link to the directory that is
being written.</para>
</listitem></varlistentry>
<varlistentry><term>Error fetching directory link.</term><listitem><para>
A read error occurred when fetching the directory link field for a previous
directory. This can occur when setting up a link to the directory that is
being written.</para>
</listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
<refsect1 id="TIFFWriteDirectory-3tiff-rtrn"><title>&rtrn-tt;</title>
<para>1 is returned when the contents are successfully written to the file.
Otherwise, 0 is returned if an error was encountered when writing the directory
contents.</para>
</refsect1>
<refsect1 id="TIFFWriteDirectory-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="TIFFWriteDirectory-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>TIFFError<?Pub Caret></refentrytitle>
<manvolnum>3tiff</manvolnum></citerefentry>, <citerefentry><refentrytitle>
TIFFOpen</refentrytitle><manvolnum>3tiff</manvolnum></citerefentry>, <citerefentry>
<refentrytitle>TIFFReadDirectory</refentrytitle><manvolnum>3tiff</manvolnum>
</citerefentry>, <citerefentry><refentrytitle>TIFFSetDirectory</refentrytitle>
<manvolnum>3tiff</manvolnum></citerefentry></para>
</refsect1>
<refsect1 id="TIFFWriteDirectory-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 *0000006538>
