Blame man/TIFFSetDirectory.3tiff

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