]> git.saurik.com Git - wxWidgets.git/blob - src/tiff/man/TIFFReadScanline.3tiff
Do not use GTKIsUsingGlobalMenu when compiled against gtk1.x
[wxWidgets.git] / src / tiff / man / TIFFReadScanline.3tiff
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
28 TIFFReadScanline \- read and decode a scanline of data from an open
29 .SM TIFF
30 file
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
36 Read the data for the specified row into the (user supplied) data buffer
37 .IR buf .
38 The data are returned decompressed and, in the native byte- and bit-ordering,
39 but are otherwise packed (see further below). The buffer must be large enough
40 to hold an entire scanline of data. Applications should call the routine
41 .IR TIFFScanlineSize
42 to find out the size (in bytes) of a scanline buffer.
43 The
44 .I row
45 parameter is always used by
46 .IR TIFFReadScanline ;
47 the
48 .I sample
49 parameter is used only if data are organized in separate planes (\c
50 .IR PlanarConfiguration =2).
51 .SH NOTES
52 The library attempts to hide bit- and byte-ordering differences between the
53 image and the native machine by converting data to the native machine order.
54 Bit reversal is done if the
55 .I FillOrder
56 tag is opposite to the native machine bit order. 16- and 32-bit samples are
57 automatically byte-swapped if the file was written with a byte order opposite
58 to the native machine byte order,
59 .PP
60 In C++ the
61 .I sample
62 parameter defaults to 0.
63 .SH "RETURN VALUES"
64 .IR TIFFReadScanline
65 returns \-1 if it detects an error; otherwise 1 is returned.
66 .SH DIAGNOSTICS
67 All error messages are directed to the
68 .IR TIFFError (3TIFF)
69 routine.
70 .PP
71 .BR "Compression algorithm does not support random access" .
72 Data was requested in a non-sequential order from a file that uses a
73 compression algorithm and that has
74 .I RowsPerStrip
75 greater than one.
76 That is, data in the image is stored in a compressed form, and with multiple
77 rows packed into a strip. In this case, the library does not support random
78 access to the data. The data should either be accessed sequentially, or the
79 file should be converted so that each strip is made up of one row of data.
80 .SH BUGS
81 Reading subsampled YCbCR data does not work correctly because, for
82 .IR PlanarConfiguration =2
83 the size of a scanline is not calculated on a per-sample basis, and for
84 .IR PlanarConfiguration =1
85 the library does not unpack the block-interleaved samples; use the strip- and
86 tile-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
93 Libtiff library home page:
94 .BR http://www.remotesensing.org/libtiff/