Blame man/TIFFSetDirectory.3tiff

Packit 994f1a
.\" $Id: TIFFSetDirectory.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
Packit 994f1a
.\"
Packit 994f1a
.\" Copyright (c) 1988-1997 Sam Leffler
Packit 994f1a
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
Packit 994f1a
.\"
Packit 994f1a
.\" Permission to use, copy, modify, distribute, and sell this software and 
Packit 994f1a
.\" its documentation for any purpose is hereby granted without fee, provided
Packit 994f1a
.\" that (i) the above copyright notices and this permission notice appear in
Packit 994f1a
.\" all copies of the software and related documentation, and (ii) the names of
Packit 994f1a
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
Packit 994f1a
.\" publicity relating to the software without the specific, prior written
Packit 994f1a
.\" permission of Sam Leffler and Silicon Graphics.
Packit 994f1a
.\" 
Packit 994f1a
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
Packit 994f1a
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
Packit 994f1a
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
Packit 994f1a
.\" 
Packit 994f1a
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
Packit 994f1a
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
Packit 994f1a
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
Packit 994f1a
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
Packit 994f1a
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
Packit 994f1a
.\" OF THIS SOFTWARE.
Packit 994f1a
.\"
Packit 994f1a
.if n .po 0
Packit 994f1a
.TH TIFFSetDirectory 3TIFF "October 15, 1995" "libtiff"
Packit 994f1a
.SH NAME
Packit 994f1a
TIFFSetDirectory, TIFFSetSubDirectory \- set the current directory for an open
Packit 994f1a
.SM TIFF
Packit 994f1a
file
Packit 994f1a
.SH SYNOPSIS
Packit 994f1a
.B "#include <tiffio.h>"
Packit 994f1a
.sp
Packit 994f1a
.BI "int TIFFSetDirectory(TIFF *" tif ", tdir_t " dirnum ")"
Packit 994f1a
.br
Packit 994f1a
.BI "int TIFFSetSubDirectory(TIFF *" tif ", uint32 " diroff ")"
Packit 994f1a
.SH DESCRIPTION
Packit 994f1a
.I TIFFSetDirectory
Packit 994f1a
changes the current directory and reads its contents with
Packit 994f1a
.IR TIFFReadDirectory .
Packit 994f1a
The parameter
Packit 994f1a
.I dirnum
Packit 994f1a
specifies the subfile/directory as an integer number, with the first directory
Packit 994f1a
numbered zero.
Packit 994f1a
.PP
Packit 994f1a
.I TIFFSetSubDirectory
Packit 994f1a
acts like 
Packit 994f1a
.IR TIFFSetDirectory ,
Packit 994f1a
except the directory is specified as a file offset instead of an index; this
Packit 994f1a
is required for accessing subdirectories linked through a
Packit 994f1a
.I SubIFD
Packit 994f1a
tag.
Packit 994f1a
.SH "RETURN VALUES"
Packit 994f1a
On successful return 1 is returned. Otherwise, 0 is returned if 
Packit 994f1a
.I dirnum
Packit 994f1a
or
Packit 994f1a
.I diroff
Packit 994f1a
specifies a non-existent directory, or if an error was encountered while
Packit 994f1a
reading the directory's contents.
Packit 994f1a
.SH DIAGNOSTICS
Packit 994f1a
All error messages are directed to the
Packit 994f1a
.IR TIFFError (3TIFF)
Packit 994f1a
routine.
Packit 994f1a
.PP
Packit 994f1a
.BR "%s: Error fetching directory count" .
Packit 994f1a
An error was encountered while reading the ``directory count'' field.
Packit 994f1a
.PP
Packit 994f1a
.BR "%s: Error fetching directory link" .
Packit 994f1a
An error was encountered while reading the ``link value'' that points to the
Packit 994f1a
next directory in a file.
Packit 994f1a
.SH "SEE ALSO"
Packit 994f1a
.IR TIFFCurrentDirectory (3TIFF),
Packit 994f1a
.IR TIFFOpen (3TIFF),
Packit 994f1a
.IR TIFFReadDirectory (3TIFF),
Packit 994f1a
.IR TIFFWriteDirectory (3TIFF),
Packit 994f1a
.IR libtiff (3TIFF)
Packit 994f1a
.PP
Packit 994f1a
Libtiff library home page:
Packit 994f1a
.BR http://www.remotesensing.org/libtiff/