roentgen b75cab
.\" $Id: TIFFquery.3tiff,v 1.1 2004-11-11 14:39:16 dron Exp $
roentgen b75cab
.\"
roentgen b75cab
.\" Copyright (c) 1988-1997 Sam Leffler
roentgen b75cab
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
roentgen b75cab
.\"
roentgen b75cab
.\" Permission to use, copy, modify, distribute, and sell this software and 
roentgen b75cab
.\" its documentation for any purpose is hereby granted without fee, provided
roentgen b75cab
.\" that (i) the above copyright notices and this permission notice appear in
roentgen b75cab
.\" all copies of the software and related documentation, and (ii) the names of
roentgen b75cab
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
roentgen b75cab
.\" publicity relating to the software without the specific, prior written
roentgen b75cab
.\" permission of Sam Leffler and Silicon Graphics.
roentgen b75cab
.\" 
roentgen b75cab
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
roentgen b75cab
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
roentgen b75cab
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
roentgen b75cab
.\" 
roentgen b75cab
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
roentgen b75cab
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
roentgen b75cab
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
roentgen b75cab
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
roentgen b75cab
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
roentgen b75cab
.\" OF THIS SOFTWARE.
roentgen b75cab
.\"
roentgen b75cab
.if n .po 0
roentgen b75cab
.TH QUERY 3TIFF "October 29, 2004" "libtiff"
roentgen b75cab
.SH NAME
roentgen b75cab
TIFFCurrentRow,
roentgen b75cab
TIFFCurrentStrip,
roentgen b75cab
TIFFCurrentTile,
roentgen b75cab
TIFFCurrentDirectory,
roentgen b75cab
TIFFLastDirectory,
roentgen b75cab
TIFFFileno,
roentgen b75cab
TIFFFileName,
roentgen b75cab
TIFFGetMode,
roentgen b75cab
TIFFIsTiled,
roentgen b75cab
TIFFIsByteSwapped,
roentgen b75cab
TIFFIsUpSampled,
roentgen b75cab
TIFFIsMSB2LSB,
roentgen b75cab
TIFFGetVersion
roentgen b75cab
\- query routines
roentgen b75cab
.SH SYNOPSIS
roentgen b75cab
.B "#include <tiffio.h>"</tiffio.h>
roentgen b75cab
.sp
roentgen b75cab
.BI "uint32 TIFFCurrentRow(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "tstrip_t TIFFCurrentStrip(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "ttile_t TIFFCurrentTile(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "tdir_t TIFFCurrentDirectory(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "int TIFFLastDirectory(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "int TIFFFileno(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "char* TIFFFileName(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "int TIFFGetMode(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "int TIFFIsTiled(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "int TIFFIsByteSwapped(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "int TIFFIsUpSampled(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "int TIFFIsMSB2LSB(TIFF* " tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "const char* TIFFGetVersion(void)"
roentgen b75cab
.SH DESCRIPTION
roentgen b75cab
The following routines return status information about an open
roentgen b75cab
.SM TIFF
roentgen b75cab
file.
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFCurrentDirectory
roentgen b75cab
returns the index of the current directory (directories are numbered starting
roentgen b75cab
at 0). This number is suitable for use with the
roentgen b75cab
.IR TIFFSetDirectory
roentgen b75cab
routine.
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFLastDirectory
roentgen b75cab
returns a non-zero value if the current directory is the last directory in the
roentgen b75cab
file; otherwise zero is returned.
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFCurrentRow ,
roentgen b75cab
.IR TIFFCurrentStrip ,
roentgen b75cab
and
roentgen b75cab
.IR TIFFCurrentTile ,
roentgen b75cab
return the current row, strip, and tile, respectively, that is being read or
roentgen b75cab
written. These values are updated each time a read or write is done.
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFFileno
roentgen b75cab
returns the underlying file descriptor used to access the 
roentgen b75cab
.SM TIFF
roentgen b75cab
image in the filesystem.
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFFileName
roentgen b75cab
returns the pathname argument passed to
roentgen b75cab
.IR TIFFOpen
roentgen b75cab
or
roentgen b75cab
.IR TIFFFdOpen .
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFGetMode
roentgen b75cab
returns the mode with which the underlying file was opened. On
roentgen b75cab
.SM UNIX
roentgen b75cab
systems, this is the value passed to the
roentgen b75cab
.IR open (2)
roentgen b75cab
system call.
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFIsTiled
roentgen b75cab
returns a non-zero value if the image data has a tiled organization. Zero is
roentgen b75cab
returned if the image data is organized in strips.
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFIsByteSwapped
roentgen b75cab
returns a non-zero value if the image data was in a different byte-order than
roentgen b75cab
the host machine. Zero is returned if the TIFF file and local host byte-orders
roentgen b75cab
are the same.  Note that TIFFReadTile(), TIFFReadStrip() and
roentgen b75cab
TIFFReadScanline() functions already normally perform byte swapping to local
roentgen b75cab
host order if needed.
roentgen b75cab
.PP
roentgen b75cab
.I TIFFIsUpSampled
roentgen b75cab
returns a non-zero value if image data returned through the read interface
roentgen b75cab
routines is being up-sampled. This can be useful to applications that want to
roentgen b75cab
calculate I/O buffer sizes to reflect this usage (though the usual strip and
roentgen b75cab
tile size routines already do this).
roentgen b75cab
.PP
roentgen b75cab
.I TIFFIsMSB2LSB
roentgen b75cab
returns a non-zero value if the image data is being returned with bit 0 as the
roentgen b75cab
most significant bit.
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFGetVersion
roentgen b75cab
returns an
roentgen b75cab
.SM ASCII
roentgen b75cab
string that has a version stamp for the 
roentgen b75cab
.SM TIFF
roentgen b75cab
library software.
roentgen b75cab
.SH DIAGNOSTICS
roentgen b75cab
None.
roentgen b75cab
.SH "SEE ALSO"
roentgen b75cab
.IR libtiff (3TIFF),
roentgen b75cab
.IR TIFFOpen (3TIFF),
roentgen b75cab
.IR TIFFFdOpen (3TIFF)