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