roentgen b75cab
.\" $Id: TIFFtile.3tiff,v 1.2 2005-11-02 11:07:19 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 TIFFTILE 3TIFF "February 14, 1992" "libtiff"
roentgen b75cab
.SH NAME
roentgen b75cab
TIFFTileSize, TIFFTileRowSize, TIFFVTileSize, TIFFDefaultTileSize,
roentgen b75cab
TIFFComputeTile, TIFFCheckTile, TIFFNumberOfTiles \- tile-related utility
roentgen b75cab
routines
roentgen b75cab
.SH SYNOPSIS
roentgen b75cab
.B "#include <tiffio.h>"</tiffio.h>
roentgen b75cab
.sp
roentgen b75cab
.BI "void TIFFDefaultTileSize(TIFF *" tif ", uint32 *" tw ", uint32 *" th ")"
roentgen b75cab
.br
roentgen b75cab
.BI "tsize_t TIFFTileSize(TIFF *" tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "tsize_t TIFFTileRowSize(TIFF *" tif ")"
roentgen b75cab
.br
roentgen b75cab
.BI "tsize_t TIFFVTileSize(TIFF *" tif ", uint32 " nrows ")"
roentgen b75cab
.br
roentgen b75cab
.BI "ttile_t TIFFComputeTile(TIFF *" tif ", uint32 " x ", uint32 " y ", uint32 " z ", tsample_t " sample ")"
roentgen b75cab
.br
roentgen b75cab
.BI "int TIFFCheckTile(TIFF *" tif ", uint32 " x ", uint32 " y ", uint32 " z ", tsample_t " sample ")"
roentgen b75cab
.br
roentgen b75cab
.BI "ttile_t TIFFNumberOfTiles(TIFF *" tif ")"
roentgen b75cab
.br
roentgen b75cab
.SH DESCRIPTION
roentgen b75cab
.I TIFFDefaultTileSize
roentgen b75cab
returns the pixel width and height of a reasonable-sized tile; suitable for
roentgen b75cab
setting up the
roentgen b75cab
.I TileWidth
roentgen b75cab
and
roentgen b75cab
.I TileLength
roentgen b75cab
tags.
roentgen b75cab
If the
roentgen b75cab
.I tw
roentgen b75cab
and
roentgen b75cab
.I th
roentgen b75cab
values passed in are non-zero, then they are adjusted to reflect any
roentgen b75cab
compression-specific requirements. The returned width and height are
roentgen b75cab
constrained to be a multiple of 16 pixels to conform with the 
roentgen b75cab
.SM TIFF
roentgen b75cab
specification.
roentgen b75cab
.PP
roentgen b75cab
.I TIFFTileSize
roentgen b75cab
returns the equivalent size for a tile of data as it would be returned in a
roentgen b75cab
call to
roentgen b75cab
.I TIFFReadTile
roentgen b75cab
or as it would be expected in a call to
roentgen b75cab
.IR TIFFWriteTile .
roentgen b75cab
.PP
roentgen b75cab
.I TIFFVTileSize
roentgen b75cab
returns the number of bytes in a row-aligned tile with
roentgen b75cab
.I nrows
roentgen b75cab
of data.
roentgen b75cab
.PP
roentgen b75cab
.I TIFFTileRowSize
roentgen b75cab
returns the number of bytes of a row of data in a tile.
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFComputeTile
roentgen b75cab
returns the tile that contains the specified coordinates. A valid tile is
roentgen b75cab
always returned; out-of-range coordinate values are clamped to the bounds of
roentgen b75cab
the image. The
roentgen b75cab
.I x
roentgen b75cab
and
roentgen b75cab
.I y
roentgen b75cab
parameters are always used in calculating a tile. The
roentgen b75cab
.I z
roentgen b75cab
parameter is used if the image is deeper than 1 slice (\c
roentgen b75cab
.IR ImageDepth >1).
roentgen b75cab
The
roentgen b75cab
.I sample
roentgen b75cab
parameter is used only if data are organized in separate planes (\c
roentgen b75cab
.IR PlanarConfiguration =2).
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFCheckTile
roentgen b75cab
returns a non-zero value if the supplied coordinates are within the bounds of
roentgen b75cab
the image and zero otherwise. The
roentgen b75cab
.I x
roentgen b75cab
parameter is checked against the value of the
roentgen b75cab
.I ImageWidth
roentgen b75cab
tag. The
roentgen b75cab
.I y
roentgen b75cab
parameter is checked against the value of the
roentgen b75cab
.I ImageLength
roentgen b75cab
tag. The
roentgen b75cab
.I z
roentgen b75cab
parameter is checked against the value of the
roentgen b75cab
.I ImageDepth
roentgen b75cab
tag (if defined). The
roentgen b75cab
.I sample
roentgen b75cab
parameter is checked against the value of the
roentgen b75cab
.I SamplesPerPixel
roentgen b75cab
parameter if the data are organized in separate planes.
roentgen b75cab
.PP
roentgen b75cab
.IR TIFFNumberOfTiles
roentgen b75cab
returns the number of tiles in the image.
roentgen b75cab
.SH DIAGNOSTICS
roentgen b75cab
None.
roentgen b75cab
.SH "SEE ALSO"
roentgen b75cab
.BR TIFFReadEncodedTile (3TIFF),
roentgen b75cab
.BR TIFFReadRawTile (3TIFF),
roentgen b75cab
.BR TIFFReadTile (3TIFF),
roentgen b75cab
.BR TIFFWriteEncodedTile (3TIFF),
roentgen b75cab
.BR TIFFWriteRawTile (3TIFF),
roentgen b75cab
.BR TIFFWriteTile (3TIFF),
roentgen b75cab
.BR libtiff (3TIFF)
roentgen b75cab
.PP
roentgen b75cab
Libtiff library home page:
roentgen b75cab
.BR http://www.remotesensing.org/libtiff/