|
kusano |
7d535a |
.\" $Id: TIFFReadScanline.3tiff,v 1.2 2005-11-02 11:07:18 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 TIFFReadScanline 3TIFF "October 15, 1995" "libtiff"
|
|
kusano |
7d535a |
.SH NAME
|
|
kusano |
7d535a |
TIFFReadScanline \- read and decode a scanline of data from an open
|
|
kusano |
7d535a |
.SM TIFF
|
|
kusano |
7d535a |
file
|
|
kusano |
7d535a |
.SH SYNOPSIS
|
|
kusano |
7d535a |
.B "#include <tiffio.h>"</tiffio.h>
|
|
kusano |
7d535a |
.sp
|
|
kusano |
7d535a |
.BI "int TIFFReadScanline(TIFF *" tif ", tdata_t " buf ", uint32 " row ", tsample_t " sample ")"
|
|
kusano |
7d535a |
.SH DESCRIPTION
|
|
kusano |
7d535a |
Read the data for the specified row into the (user supplied) data buffer
|
|
kusano |
7d535a |
.IR buf .
|
|
kusano |
7d535a |
The data are returned decompressed and, in the native byte- and bit-ordering,
|
|
kusano |
7d535a |
but are otherwise packed (see further below). The buffer must be large enough
|
|
kusano |
7d535a |
to hold an entire scanline of data. Applications should call the routine
|
|
kusano |
7d535a |
.IR TIFFScanlineSize
|
|
kusano |
7d535a |
to find out the size (in bytes) of a scanline buffer.
|
|
kusano |
7d535a |
The
|
|
kusano |
7d535a |
.I row
|
|
kusano |
7d535a |
parameter is always used by
|
|
kusano |
7d535a |
.IR TIFFReadScanline ;
|
|
kusano |
7d535a |
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 |
.SH NOTES
|
|
kusano |
7d535a |
The library attempts to hide bit- and byte-ordering differences between the
|
|
kusano |
7d535a |
image and the native machine by converting data to the native machine order.
|
|
kusano |
7d535a |
Bit reversal is done if the
|
|
kusano |
7d535a |
.I FillOrder
|
|
kusano |
7d535a |
tag is opposite to the native machine bit order. 16- and 32-bit samples are
|
|
kusano |
7d535a |
automatically byte-swapped if the file was written with a byte order opposite
|
|
kusano |
7d535a |
to the native machine byte order,
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
In C++ the
|
|
kusano |
7d535a |
.I sample
|
|
kusano |
7d535a |
parameter defaults to 0.
|
|
kusano |
7d535a |
.SH "RETURN VALUES"
|
|
kusano |
7d535a |
.IR TIFFReadScanline
|
|
kusano |
7d535a |
returns \-1 if it detects an error; otherwise 1 is returned.
|
|
kusano |
7d535a |
.SH DIAGNOSTICS
|
|
kusano |
7d535a |
All error messages are directed to the
|
|
kusano |
7d535a |
.IR TIFFError (3TIFF)
|
|
kusano |
7d535a |
routine.
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
.BR "Compression algorithm does not support random access" .
|
|
kusano |
7d535a |
Data was requested in a non-sequential order from a file that uses a
|
|
kusano |
7d535a |
compression algorithm and that has
|
|
kusano |
7d535a |
.I RowsPerStrip
|
|
kusano |
7d535a |
greater than one.
|
|
kusano |
7d535a |
That is, data in the image is stored in a compressed form, and with multiple
|
|
kusano |
7d535a |
rows packed into a strip. In this case, the library does not support random
|
|
kusano |
7d535a |
access to the data. The data should either be accessed sequentially, or the
|
|
kusano |
7d535a |
file should be converted so that each strip is made up of one row of data.
|
|
kusano |
7d535a |
.SH BUGS
|
|
kusano |
7d535a |
Reading subsampled YCbCR data does not work correctly because, for
|
|
kusano |
7d535a |
.IR PlanarConfiguration =2
|
|
kusano |
7d535a |
the size of a scanline is not calculated on a per-sample basis, and for
|
|
kusano |
7d535a |
.IR PlanarConfiguration =1
|
|
kusano |
7d535a |
the library does not unpack the block-interleaved samples; use the strip- and
|
|
kusano |
7d535a |
tile-based interfaces to read these formats.
|
|
kusano |
7d535a |
.SH "SEE ALSO"
|
|
kusano |
7d535a |
.BR TIFFOpen (3TIFF),
|
|
kusano |
7d535a |
.BR TIFFReadEncodedStrip (3TIFF),
|
|
kusano |
7d535a |
.BR TIFFReadRawStrip (3TIFF),
|
|
kusano |
7d535a |
.BR libtiff (3TIFF)
|
|
kusano |
7d535a |
.PP
|
|
kusano |
7d535a |
Libtiff library home page:
|
|
kusano |
7d535a |
.BR http://www.remotesensing.org/libtiff/
|