kusano 7d535a
.\" $Id: TIFFstrip.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
kusano 7d535a
.\"
kusano 7d535a
.\" Copyright (c) 1992-1997 Sam Leffler
kusano 7d535a
.\" Copyright (c) 1992-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 TIFFSTRIP 3TIFF "October 15, 1995" "libtiff"
kusano 7d535a
.SH NAME
kusano 7d535a
TIFFDefaultStripSize, TIFFStripSize, TIFFVStripSize, TIFFRawStripSize,
kusano 7d535a
TIFFComputeStrip, TIFFNumberOfStrips \- strip-related utility routines
kusano 7d535a
.SH SYNOPSIS
kusano 7d535a
.B "#include <tiffio.h>"</tiffio.h>
kusano 7d535a
.sp
kusano 7d535a
.BI "uint32 TIFFDefaultStripSize(TIFF *" tif ", uint32 " estimate ")"
kusano 7d535a
.br
kusano 7d535a
.BI "tsize_t TIFFStripSize(TIFF *" tif ")"
kusano 7d535a
.br
kusano 7d535a
.BI "tsize_t TIFFVStripSize(TIFF *" tif ", uint32 " nrows ")"
kusano 7d535a
.br
kusano 7d535a
.BI "tsize_t TIFFRawStripSize(TIFF *" tif ", tstrip_t " strip ")"
kusano 7d535a
.br
kusano 7d535a
.BI "tstrip_t TIFFComputeStrip(TIFF *" tif ", uint32 " row ", tsample_t " sample ")"
kusano 7d535a
.br
kusano 7d535a
.BI "tstrip_t TIFFNumberOfStrips(TIFF *" tif ")"
kusano 7d535a
.SH DESCRIPTION
kusano 7d535a
.I TIFFDefaultStripSize
kusano 7d535a
returns the number of rows for a reasonable-sized strip according to the
kusano 7d535a
current settings of the
kusano 7d535a
.IR ImageWidth ,
kusano 7d535a
.IR BitsPerSample ,
kusano 7d535a
.IR SamplesPerPixel ,
kusano 7d535a
tags and any compression-specific requirements. If the
kusano 7d535a
.I estimate
kusano 7d535a
parameter, if non-zero, then it is taken as an estimate of the desired strip
kusano 7d535a
size and adjusted according to any compression-specific requirements. The
kusano 7d535a
value returned by this function is typically used to define the
kusano 7d535a
.I RowsPerStrip
kusano 7d535a
tag. In lieu of any unusual requirements
kusano 7d535a
.I TIFFDefaultStripSize
kusano 7d535a
tries to create strips that have approximately
kusano 7d535a
8 kilobytes of uncompressed data.
kusano 7d535a
.PP
kusano 7d535a
.IR TIFFStripSize
kusano 7d535a
returns the equivalent size for a strip of data as it would be returned in a
kusano 7d535a
call to
kusano 7d535a
.IR TIFFReadEncodedStrip
kusano 7d535a
or as it would be expected in a call to
kusano 7d535a
.IR TIFFWriteEncodedStrip .
kusano 7d535a
.PP
kusano 7d535a
.I TIFFVStripSize
kusano 7d535a
returns the number of bytes in a strip with
kusano 7d535a
.I nrows
kusano 7d535a
rows of data.
kusano 7d535a
.PP
kusano 7d535a
.I TIFFRawStripSize
kusano 7d535a
returns the number of bytes in a raw strip (i.e. not decoded).
kusano 7d535a
.PP
kusano 7d535a
.IR TIFFComputeStrip
kusano 7d535a
returns the strip that contains the specified coordinates. A valid strip is
kusano 7d535a
always returned; out-of-range coordinate values are clamped to the bounds of
kusano 7d535a
the image. The
kusano 7d535a
.I row
kusano 7d535a
parameter is always used in calculating a strip. The
kusano 7d535a
.I sample
kusano 7d535a
parameter is used only if data are organized in separate planes (\c
kusano 7d535a
.IR PlanarConfiguration =2).
kusano 7d535a
.PP
kusano 7d535a
.IR TIFFNumberOfStrips
kusano 7d535a
returns the number of strips in the image.
kusano 7d535a
.SH DIAGNOSTICS
kusano 7d535a
None.
kusano 7d535a
.SH "SEE ALSO"
kusano 7d535a
.BR TIFFReadEncodedStrip (3TIFF),
kusano 7d535a
.BR TIFFReadRawStrip (3TIFF),
kusano 7d535a
.BR TIFFWriteEncodedStrip (3TIFF),
kusano 7d535a
.BR TIFFWriteRawStrip (3TIFF),
kusano 7d535a
.BR libtiff (3TIFF),
kusano 7d535a
.PP
kusano 7d535a
Libtiff library home page:
kusano 7d535a
.BR http://www.remotesensing.org/libtiff/