'\" te .TH TIFFReadScanline 3tiff "05 Apr 2004" "" "" .SH "NAME" TIFFReadScanline \- read and decode a scanline of data from an open TIFF file .SH "SYNOPSIS" .sp .nf \f(CW#include int TIFFReadScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample)\fR .fi .sp .SH "" .PP Read the data for the specified row into the user-supplied data buffer\&. .SH "EXTENDED DESCRIPTION" .PP The data is returned decompressed and in the native byte- and bit-ordering, but is otherwise packed as described below\&. The buffer must be large enough to hold an entire scanline of data\&. Applications should call the routine \fBTIFFScanlineSize\fR to find out the size in bytes of a scanline buffer\&. The \fBrow\fR parameter is always used by \fBTIFFReadScanline\fR\&. The \fBsample\fR parameter is used only if data is organized in separate planes (PlanarConfiguration=2)\&. .PP The library attempts to hide bit- and byte-ordering differences between the image and the native machine by converting data to the native machine order\&. Bit reversal is performed if the \fBFillOrder\fR tag is opposite to the native machine bit order\&. 16- and 32-bit samples are automatically byte-swapped if the file was written with a byte order opposite to the native machine byte order\&. .SS "Diagnostics" .PP All error messages are directed to the \fBTIFFError(3tiff)\fR routine\&. .sp .ne 2 .mk \fBCompression algorithm does not support random access\&.\fR .in +24n .rt Data was requested in a non-sequential order from a file that uses a compression algorithm and that has \fBRowsPerStrip\fR greater than one\&. That is, data in the image is stored in a compressed form, and with multiple rows packed into a strip\&. In this case, the library does not support random access to the data\&. The data should either be accessed sequentially, or the file should be converted so that each strip is made up of one row of data\&. .sp .sp 1 .in -24n .SH "" .PP Returns -1 if an error was encountered\&. Otherwise, returns 1\&. .SH "" .PP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .TS tab() allbox; cw(2.750000i)| cw(2.750000i) lw(2.750000i)| lw(2.750000i). ATTRIBUTE TYPEATTRIBUTE VALUE Availabilityimage/library/libtiff Interface stabilityUncommitted .TE .sp .SH "" .PP \fBlibtiff\fR(3), \fBTIFFOpen\fR(3tiff), \fBTIFFReadEncodedStrip\fR(3tiff), \fBTIFFReadRawStrip\fR(3tiff) .SH "" .PP In C++, the \fBsample\fR parameter defaults to 0\&. .PP Reading subsampled YCbCR data does not work correctly because: .sp .in +2 \(bu .mk .in +3 .rt For PlanarConfiguration=2, the size of a scanline is not calculated on a per-sample basis\&. .sp .in -3 \(bu .mk .in +3 .rt For PlanarConfiguration=1, the library does not unpack the block-interleaved samples\&. .sp .in -3 .in -2 .PP Use the strip- and tile-based interfaces to read these formats\&. .PP This man page was originally written by Sam Leffler\&. Updated by Breda McColgan, Sun Microsystems Inc\&., 2004\&. ...\" created by instant / solbook-to-man, Thu 20 Mar 2014, 02:30 ...\" LSARC 2003/085 libtiff, libjpeg, and libpng