]> git.saurik.com Git - wxWidgets.git/blame - src/tiff/man/TIFFReadScanline.3tiff
readding trace constant
[wxWidgets.git] / src / tiff / man / TIFFReadScanline.3tiff
CommitLineData
8414a40c
VZ
1.\" $Id: TIFFReadScanline.3tiff,v 1.2 2005/11/02 11:07:18 dron Exp $
2.\"
3.\" Copyright (c) 1988-1997 Sam Leffler
4.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
5.\"
6.\" Permission to use, copy, modify, distribute, and sell this software and
7.\" its documentation for any purpose is hereby granted without fee, provided
8.\" that (i) the above copyright notices and this permission notice appear in
9.\" all copies of the software and related documentation, and (ii) the names of
10.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
11.\" publicity relating to the software without the specific, prior written
12.\" permission of Sam Leffler and Silicon Graphics.
13.\"
14.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
15.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
16.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
17.\"
18.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
19.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
20.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
21.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
22.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
23.\" OF THIS SOFTWARE.
24.\"
25.if n .po 0
26.TH TIFFReadScanline 3TIFF "October 15, 1995" "libtiff"
27.SH NAME
28TIFFReadScanline \- read and decode a scanline of data from an open
29.SM TIFF
30file
31.SH SYNOPSIS
32.B "#include <tiffio.h>"
33.sp
34.BI "int TIFFReadScanline(TIFF *" tif ", tdata_t " buf ", uint32 " row ", tsample_t " sample ")"
35.SH DESCRIPTION
36Read the data for the specified row into the (user supplied) data buffer
37.IR buf .
38The data are returned decompressed and, in the native byte- and bit-ordering,
39but are otherwise packed (see further below). The buffer must be large enough
40to hold an entire scanline of data. Applications should call the routine
41.IR TIFFScanlineSize
42to find out the size (in bytes) of a scanline buffer.
43The
44.I row
45parameter is always used by
46.IR TIFFReadScanline ;
47the
48.I sample
49parameter is used only if data are organized in separate planes (\c
50.IR PlanarConfiguration =2).
51.SH NOTES
52The library attempts to hide bit- and byte-ordering differences between the
53image and the native machine by converting data to the native machine order.
54Bit reversal is done if the
55.I FillOrder
56tag is opposite to the native machine bit order. 16- and 32-bit samples are
57automatically byte-swapped if the file was written with a byte order opposite
58to the native machine byte order,
59.PP
60In C++ the
61.I sample
62parameter defaults to 0.
63.SH "RETURN VALUES"
64.IR TIFFReadScanline
65returns \-1 if it detects an error; otherwise 1 is returned.
66.SH DIAGNOSTICS
67All error messages are directed to the
68.IR TIFFError (3TIFF)
69routine.
70.PP
71.BR "Compression algorithm does not support random access" .
72Data was requested in a non-sequential order from a file that uses a
73compression algorithm and that has
74.I RowsPerStrip
75greater than one.
76That is, data in the image is stored in a compressed form, and with multiple
77rows packed into a strip. In this case, the library does not support random
78access to the data. The data should either be accessed sequentially, or the
79file should be converted so that each strip is made up of one row of data.
80.SH BUGS
81Reading subsampled YCbCR data does not work correctly because, for
82.IR PlanarConfiguration =2
83the size of a scanline is not calculated on a per-sample basis, and for
84.IR PlanarConfiguration =1
85the library does not unpack the block-interleaved samples; use the strip- and
86tile-based interfaces to read these formats.
87.SH "SEE ALSO"
88.BR TIFFOpen (3TIFF),
89.BR TIFFReadEncodedStrip (3TIFF),
90.BR TIFFReadRawStrip (3TIFF),
91.BR libtiff (3TIFF)
92.PP
93Libtiff library home page:
94.BR http://www.remotesensing.org/libtiff/