Blame man/TIFFSetDirectory.3tiff

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