Blame html/man/TIFFWriteDirectory.3tiff.html

Packit 994f1a
Packit 994f1a
Packit 994f1a
<html>
Packit 994f1a
<head>
Packit 994f1a
<meta name="generator" content="groff -Thtml, see www.gnu.org">
Packit 994f1a
<meta name="Content-Style" content="text/css">
Packit 994f1a
<title>TIFFWriteDirectory</title>
Packit 994f1a
</head>
Packit 994f1a
<body>
Packit 994f1a
Packit 994f1a

TIFFWriteDirectory

Packit 994f1a
NAME
Packit 994f1a
SYNOPSIS
Packit 994f1a
DESCRIPTION
Packit 994f1a
RETURN VALUES
Packit 994f1a
DIAGNOSTICS
Packit 994f1a
SEE ALSO
Packit 994f1a
Packit 994f1a

Packit 994f1a
Packit 994f1a

NAME

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

TIFFWriteDirectory, TIFFRewriteDirectory,

Packit 994f1a
TIFFCheckpointDirectory − write the current directory
Packit 994f1a
in an open <small>TIFF</small> file

Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

SYNOPSIS

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

#include <tiffio.h>

Packit 994f1a
Packit 994f1a

int TIFFWriteDirectory(TIFF *tif)

Packit 994f1a
int TIFFRewriteDirectory(TIFF *tif)
Packit 994f1a
int TIFFCheckpointDirectory(TIFF *tif)

Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

DESCRIPTION

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

TIFFWriteDirectory will write the contents of the

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

Packit 994f1a
Packit 994f1a

The TIFFRewriteDirectory function operates

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

Packit 994f1a
Packit 994f1a

The TIFFCheckpointDirectory writes the current

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

Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

RETURN VALUES

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

1 is returned when the contents are successfully written

Packit 994f1a
to the file. Otherwise, 0 is returned if an error was
Packit 994f1a
encountered when writing the directory contents.

Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

DIAGNOSTICS

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

All error messages are directed to the

Packit 994f1a
TIFFError(3TIFF) routine.

Packit 994f1a
Packit 994f1a

Error post-encoding before directory write. Before

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

Packit 994f1a
Packit 994f1a

Error flushing data before directory write. Before

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

Packit 994f1a
Packit 994f1a

Cannot write directory, out of space. There was

Packit 994f1a
not enough space to allocate a temporary area for the
Packit 994f1a
directory that was to be written.

Packit 994f1a
Packit 994f1a

Error writing directory count. A write error

Packit 994f1a
occurred when writing the count of fields in the
Packit 994f1a
directory.

Packit 994f1a
Packit 994f1a

Error writing directory contents. A write error

Packit 994f1a
occurred when writing the directory fields.

Packit 994f1a
Packit 994f1a

Error writing directory link. A write error

Packit 994f1a
occurred when writing the link to the next directory.

Packit 994f1a
Packit 994f1a

Error writing data for field "%s". A

Packit 994f1a
write error occurred when writing indirect data for the
Packit 994f1a
specified field.

Packit 994f1a
Packit 994f1a

Error writing TIFF header. A write error occurred

Packit 994f1a
when re-writing header at the front of the file.

Packit 994f1a
Packit 994f1a

Error fetching directory count. A read error

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

Packit 994f1a
Packit 994f1a

Error fetching directory link. A read error

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

Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

SEE ALSO

Packit 994f1a
Packit 994f1a
Packit 994f1a
       cols="2" cellspacing="0" cellpadding="0">
Packit 994f1a
Packit 994f1a
Packit 994f1a
Packit 994f1a

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

Packit 994f1a
TIFFReadDirectory(3TIFF),
Packit 994f1a
TIFFSetDirectory(3TIFF), libtiff(3TIFF)

Packit 994f1a
Packit 994f1a

Libtiff library home page:

Packit 994f1a
http://www.remotesensing.org/libtiff/

Packit 994f1a
Packit 994f1a
Packit 994f1a

Packit 994f1a
</body>
Packit 994f1a
</html>