|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
<meta content="groff -Thtml, see www.gnu.org" name="generator">
|
|
kusano |
7d535a |
<meta content="text/css" name="Content-Style">
|
|
kusano |
7d535a |
<title>TIFFWriteDirectory</title>
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TIFFWriteDirectory
|
|
kusano |
7d535a |
NAME
|
|
kusano |
7d535a |
SYNOPSIS
|
|
kusano |
7d535a |
DESCRIPTION
|
|
kusano |
7d535a |
RETURN VALUES
|
|
kusano |
7d535a |
DIAGNOSTICS
|
|
kusano |
7d535a |
SEE ALSO
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
NAME
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TIFFWriteDirectory, TIFFRewriteDirectory,
|
|
kusano |
7d535a |
TIFFCheckpointDirectory − write the current directory
|
|
kusano |
7d535a |
in an open <small>TIFF</small> file
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SYNOPSIS
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
#include <tiffio.h>
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
int TIFFWriteDirectory(TIFF *tif)
|
|
kusano |
7d535a |
int TIFFRewriteDirectory(TIFF *tif)
|
|
kusano |
7d535a |
int TIFFCheckpointDirectory(TIFF *tif)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
DESCRIPTION
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TIFFWriteDirectory will write the contents of the
|
|
kusano |
7d535a |
current directory to the file and setup to create a new
|
|
kusano |
7d535a |
subfile in the same file. Applications only need to call
|
|
kusano |
7d535a |
TIFFWriteDirectory when writing multiple subfiles to
|
|
kusano |
7d535a |
a single <small>TIFF</small> file. TIFFWriteDirectory
|
|
kusano |
7d535a |
is automatically called by TIFFClose and
|
|
kusano |
7d535a |
TIFFFlush to write a modified directory if the file
|
|
kusano |
7d535a |
is open for writing.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The TIFFRewriteDirectory function operates
|
|
kusano |
7d535a |
similarly to TIFFWriteDirectory, but can be called
|
|
kusano |
7d535a |
with directories previously read or written that already
|
|
kusano |
7d535a |
have an established location in the file. It will rewrite
|
|
kusano |
7d535a |
the directory, but instead of place it at it’s old
|
|
kusano |
7d535a |
location (as TIFFWriteDirectory would) it will place
|
|
kusano |
7d535a |
them at the end of the file, correcting the pointer from the
|
|
kusano |
7d535a |
preceeding directory or file header to point to it’s
|
|
kusano |
7d535a |
new location. This is particularly important in cases where
|
|
kusano |
7d535a |
the size of the directory and pointed to data has grown, so
|
|
kusano |
7d535a |
it won’t fit in the space available at the old
|
|
kusano |
7d535a |
location.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The TIFFCheckpointDirectory writes the current
|
|
kusano |
7d535a |
state of the tiff directory into the file to make what is
|
|
kusano |
7d535a |
currently in the file readable. Unlike
|
|
kusano |
7d535a |
TIFFWriteDirectory, TIFFCheckpointDirectory does not
|
|
kusano |
7d535a |
free up the directory data structures in memory, so they can
|
|
kusano |
7d535a |
be updated (as strips/tiles are written) and written again.
|
|
kusano |
7d535a |
Reading such a partial file you will at worst get a tiff
|
|
kusano |
7d535a |
read error for the first strip/tile encountered that is
|
|
kusano |
7d535a |
incomplete, but you will at least get all the valid data in
|
|
kusano |
7d535a |
the file before that. When the file is complete, just use
|
|
kusano |
7d535a |
TIFFWriteDirectory as usual to finish it off
|
|
kusano |
7d535a |
cleanly.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
RETURN VALUES
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
1 is returned when the contents are successfully written
|
|
kusano |
7d535a |
to the file. Otherwise, 0 is returned if an error was
|
|
kusano |
7d535a |
encountered when writing the directory contents.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
DIAGNOSTICS
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
All error messages are directed to the
|
|
kusano |
7d535a |
TIFFError(3TIFF) routine.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Error post-encoding before directory write. Before
|
|
kusano |
7d535a |
writing the contents of the current directory, any pending
|
|
kusano |
7d535a |
data are flushed. This message indicates that an error
|
|
kusano |
7d535a |
occurred while doing this.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Error flushing data before directory write. Before
|
|
kusano |
7d535a |
writing the contents of the current directory, any pending
|
|
kusano |
7d535a |
data are flushed. This message indicates that an error
|
|
kusano |
7d535a |
occurred while doing this.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Cannot write directory, out of space. There was
|
|
kusano |
7d535a |
not enough space to allocate a temporary area for the
|
|
kusano |
7d535a |
directory that was to be written.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Error writing directory count. A write error
|
|
kusano |
7d535a |
occurred when writing the count of fields in the
|
|
kusano |
7d535a |
directory.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Error writing directory contents. A write error
|
|
kusano |
7d535a |
occurred when writing the directory fields.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Error writing directory link. A write error
|
|
kusano |
7d535a |
occurred when writing the link to the next directory.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Error writing data for field "%s". A
|
|
kusano |
7d535a |
write error occurred when writing indirect data for the
|
|
kusano |
7d535a |
specified field.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Error writing TIFF header. A write error occurred
|
|
kusano |
7d535a |
when re-writing header at the front of the file.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Error fetching directory count. A read error
|
|
kusano |
7d535a |
occurred when fetching the directory count field for a
|
|
kusano |
7d535a |
previous directory. This can occur when setting up a link to
|
|
kusano |
7d535a |
the directory that is being written.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Error fetching directory link. A read error
|
|
kusano |
7d535a |
occurred when fetching the directory link field for a
|
|
kusano |
7d535a |
previous directory. This can occur when setting up a link to
|
|
kusano |
7d535a |
the directory that is being written.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SEE ALSO
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
cols="2" cellspacing="0" cellpadding="0">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
TIFFOpen(3TIFF), TIFFError(3TIFF),
|
|
kusano |
7d535a |
TIFFReadDirectory(3TIFF),
|
|
kusano |
7d535a |
TIFFSetDirectory(3TIFF), libtiff(3TIFF)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Libtiff library home page:
|
|
kusano |
7d535a |
http://www.remotesensing.org/libtiff/
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|