Blame html/man/TIFFWriteDirectory.3tiff.html

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

TIFFWriteDirectory

Packit 85355f
NAME
Packit 85355f
SYNOPSIS
Packit 85355f
DESCRIPTION
Packit 85355f
RETURN VALUES
Packit 85355f
DIAGNOSTICS
Packit 85355f
SEE ALSO
Packit 85355f
Packit 85355f

Packit 85355f
Packit 85355f

NAME

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

TIFFWriteDirectory, TIFFRewriteDirectory,

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

Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

SYNOPSIS

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

#include <tiffio.h>

Packit 85355f
Packit 85355f

int TIFFWriteDirectory(TIFF *tif)

Packit 85355f
int TIFFRewriteDirectory(TIFF *tif)
Packit 85355f
int TIFFCheckpointDirectory(TIFF *tif)

Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

DESCRIPTION

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

TIFFWriteDirectory will write the contents of the

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

Packit 85355f
Packit 85355f

The TIFFRewriteDirectory function operates

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

Packit 85355f
Packit 85355f

The TIFFCheckpointDirectory writes the current

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

Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

RETURN VALUES

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

1 is returned when the contents are successfully written

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

Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

DIAGNOSTICS

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

All error messages are directed to the

Packit 85355f
TIFFError(3TIFF) routine.

Packit 85355f
Packit 85355f

Error post-encoding before directory write. Before

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

Packit 85355f
Packit 85355f

Error flushing data before directory write. Before

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

Packit 85355f
Packit 85355f

Cannot write directory, out of space. There was

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

Packit 85355f
Packit 85355f

Error writing directory count. A write error

Packit 85355f
occurred when writing the count of fields in the
Packit 85355f
directory.

Packit 85355f
Packit 85355f

Error writing directory contents. A write error

Packit 85355f
occurred when writing the directory fields.

Packit 85355f
Packit 85355f

Error writing directory link. A write error

Packit 85355f
occurred when writing the link to the next directory.

Packit 85355f
Packit 85355f

Error writing data for field "%s". A

Packit 85355f
write error occurred when writing indirect data for the
Packit 85355f
specified field.

Packit 85355f
Packit 85355f

Error writing TIFF header. A write error occurred

Packit 85355f
when re-writing header at the front of the file.

Packit 85355f
Packit 85355f

Error fetching directory count. A read error

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

Packit 85355f
Packit 85355f

Error fetching directory link. A read error

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

Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

SEE ALSO

Packit 85355f
Packit 85355f
Packit 85355f
       cols="2" cellspacing="0" cellpadding="0">
Packit 85355f
Packit 85355f
Packit 85355f
Packit 85355f

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

Packit 85355f
TIFFReadDirectory(3TIFF),
Packit 85355f
TIFFSetDirectory(3TIFF), libtiff(3TIFF)

Packit 85355f
Packit 85355f

Libtiff library home page:

Packit 85355f
http://www.simplesystems.org/libtiff/

Packit 85355f
Packit 85355f
Packit 85355f

Packit 85355f
</body>
Packit 85355f
</html>