Blame man/TIFFSetDirectory.3tiff

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