roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab
<meta content="groff -Thtml, see www.gnu.org" name="generator">
roentgen b75cab
<meta content="text/css" name="Content-Style">
roentgen b75cab
<title>TIFFWriteDirectory</title>
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

TIFFWriteDirectory

roentgen b75cab
NAME
roentgen b75cab
SYNOPSIS
roentgen b75cab
DESCRIPTION
roentgen b75cab
RETURN VALUES
roentgen b75cab
DIAGNOSTICS
roentgen b75cab
SEE ALSO
roentgen b75cab
roentgen b75cab

roentgen b75cab
roentgen b75cab

NAME

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

TIFFWriteDirectory, TIFFRewriteDirectory,

roentgen b75cab
TIFFCheckpointDirectory − write the current directory
roentgen b75cab
in an open <small>TIFF</small> file

roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

SYNOPSIS

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

#include <tiffio.h>

roentgen b75cab
roentgen b75cab

int TIFFWriteDirectory(TIFF *tif)

roentgen b75cab
int TIFFRewriteDirectory(TIFF *tif)
roentgen b75cab
int TIFFCheckpointDirectory(TIFF *tif)

roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

DESCRIPTION

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

TIFFWriteDirectory will write the contents of the

roentgen b75cab
current directory to the file and setup to create a new
roentgen b75cab
subfile in the same file. Applications only need to call
roentgen b75cab
TIFFWriteDirectory when writing multiple subfiles to
roentgen b75cab
a single <small>TIFF</small> file. TIFFWriteDirectory
roentgen b75cab
is automatically called by TIFFClose and
roentgen b75cab
TIFFFlush to write a modified directory if the file
roentgen b75cab
is open for writing.

roentgen b75cab
roentgen b75cab

The TIFFRewriteDirectory function operates

roentgen b75cab
similarly to TIFFWriteDirectory, but can be called
roentgen b75cab
with directories previously read or written that already
roentgen b75cab
have an established location in the file. It will rewrite
roentgen b75cab
the directory, but instead of place it at it’s old
roentgen b75cab
location (as TIFFWriteDirectory would) it will place
roentgen b75cab
them at the end of the file, correcting the pointer from the
roentgen b75cab
preceeding directory or file header to point to it’s
roentgen b75cab
new location. This is particularly important in cases where
roentgen b75cab
the size of the directory and pointed to data has grown, so
roentgen b75cab
it won’t fit in the space available at the old
roentgen b75cab
location.

roentgen b75cab
roentgen b75cab

The TIFFCheckpointDirectory writes the current

roentgen b75cab
state of the tiff directory into the file to make what is
roentgen b75cab
currently in the file readable. Unlike
roentgen b75cab
TIFFWriteDirectory, TIFFCheckpointDirectory does not
roentgen b75cab
free up the directory data structures in memory, so they can
roentgen b75cab
be updated (as strips/tiles are written) and written again.
roentgen b75cab
Reading such a partial file you will at worst get a tiff
roentgen b75cab
read error for the first strip/tile encountered that is
roentgen b75cab
incomplete, but you will at least get all the valid data in
roentgen b75cab
the file before that. When the file is complete, just use
roentgen b75cab
TIFFWriteDirectory as usual to finish it off
roentgen b75cab
cleanly.

roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

RETURN VALUES

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

1 is returned when the contents are successfully written

roentgen b75cab
to the file. Otherwise, 0 is returned if an error was
roentgen b75cab
encountered when writing the directory contents.

roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

DIAGNOSTICS

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

All error messages are directed to the

roentgen b75cab
TIFFError(3TIFF) routine.

roentgen b75cab
roentgen b75cab

Error post-encoding before directory write. Before

roentgen b75cab
writing the contents of the current directory, any pending
roentgen b75cab
data are flushed. This message indicates that an error
roentgen b75cab
occurred while doing this.

roentgen b75cab
roentgen b75cab

Error flushing data before directory write. Before

roentgen b75cab
writing the contents of the current directory, any pending
roentgen b75cab
data are flushed. This message indicates that an error
roentgen b75cab
occurred while doing this.

roentgen b75cab
roentgen b75cab

Cannot write directory, out of space. There was

roentgen b75cab
not enough space to allocate a temporary area for the
roentgen b75cab
directory that was to be written.

roentgen b75cab
roentgen b75cab

Error writing directory count. A write error

roentgen b75cab
occurred when writing the count of fields in the
roentgen b75cab
directory.

roentgen b75cab
roentgen b75cab

Error writing directory contents. A write error

roentgen b75cab
occurred when writing the directory fields.

roentgen b75cab
roentgen b75cab

Error writing directory link. A write error

roentgen b75cab
occurred when writing the link to the next directory.

roentgen b75cab
roentgen b75cab

Error writing data for field "%s". A

roentgen b75cab
write error occurred when writing indirect data for the
roentgen b75cab
specified field.

roentgen b75cab
roentgen b75cab

Error writing TIFF header. A write error occurred

roentgen b75cab
when re-writing header at the front of the file.

roentgen b75cab
roentgen b75cab

Error fetching directory count. A read error

roentgen b75cab
occurred when fetching the directory count field for a
roentgen b75cab
previous directory. This can occur when setting up a link to
roentgen b75cab
the directory that is being written.

roentgen b75cab
roentgen b75cab

Error fetching directory link. A read error

roentgen b75cab
occurred when fetching the directory link field for a
roentgen b75cab
previous directory. This can occur when setting up a link to
roentgen b75cab
the directory that is being written.

roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

SEE ALSO

roentgen b75cab
roentgen b75cab
roentgen b75cab
       cols="2" cellspacing="0" cellpadding="0">
roentgen b75cab
roentgen b75cab
roentgen b75cab
roentgen b75cab

TIFFOpen(3TIFF), TIFFError(3TIFF),

roentgen b75cab
TIFFReadDirectory(3TIFF),
roentgen b75cab
TIFFSetDirectory(3TIFF), libtiff(3TIFF)

roentgen b75cab
roentgen b75cab

Libtiff library home page:

roentgen b75cab
http://www.remotesensing.org/libtiff/

roentgen b75cab
roentgen b75cab
roentgen b75cab

roentgen b75cab
roentgen b75cab