1<!-- Creator : groff version 1.19.2 --> 2<!-- CreationDate: Mon Jan 2 17:41:43 2006 --> 3<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 4"http://www.w3.org/TR/html4/loose.dtd"> 5<html> 6<head> 7<meta name="generator" content="groff -Thtml, see www.gnu.org"> 8<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> 9<meta name="Content-Style" content="text/css"> 10<style type="text/css"> 11 p { margin-top: 0; margin-bottom: 0; } 12 pre { margin-top: 0; margin-bottom: 0; } 13 table { margin-top: 0; margin-bottom: 0; } 14</style> 15<title>TIFFReadScanline</title> 16 17</head> 18<body> 19 20<h1 align=center>TIFFReadScanline</h1> 21 22<a href="#NAME">NAME</a><br> 23<a href="#SYNOPSIS">SYNOPSIS</a><br> 24<a href="#DESCRIPTION">DESCRIPTION</a><br> 25<a href="#NOTES">NOTES</a><br> 26<a href="#RETURN VALUES">RETURN VALUES</a><br> 27<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br> 28<a href="#BUGS">BUGS</a><br> 29<a href="#SEE ALSO">SEE ALSO</a><br> 30 31<hr> 32 33 34<a name="NAME"></a> 35<h2>NAME</h2> 36 37 38 39<p style="margin-left:11%; margin-top: 1em">TIFFReadScanline 40− read and decode a scanline of data from an open 41<small>TIFF</small> file</p> 42 43<a name="SYNOPSIS"></a> 44<h2>SYNOPSIS</h2> 45 46 47<p style="margin-left:11%; margin-top: 1em"><b>#include 48<tiffio.h></b></p> 49 50<p style="margin-left:11%; margin-top: 1em"><b>int 51TIFFReadScanline(TIFF *</b><i>tif</i><b>, tdata_t</b> 52<i>buf</i><b>, uint32</b> <i>row</i><b>, tsample_t</b> 53<i>sample</i><b>)</b></p> 54 55<a name="DESCRIPTION"></a> 56<h2>DESCRIPTION</h2> 57 58 59<p style="margin-left:11%; margin-top: 1em">Read the data 60for the specified row into the (user supplied) data buffer 61<i>buf</i>. The data are returned decompressed and, in the 62native byte- and bit-ordering, but are otherwise packed (see 63further below). The buffer must be large enough to hold an 64entire scanline of data. Applications should call the 65routine <i>TIFFScanlineSize</i> to find out the size (in 66bytes) of a scanline buffer. The <i>row</i> parameter is 67always used by <i>TIFFReadScanline</i>; the <i>sample</i> 68parameter is used only if data are organized in separate 69planes (<i>PlanarConfiguration</i>=2).</p> 70 71<a name="NOTES"></a> 72<h2>NOTES</h2> 73 74 75<p style="margin-left:11%; margin-top: 1em">The library 76attempts to hide bit- and byte-ordering differences between 77the image and the native machine by converting data to the 78native machine order. Bit reversal is done if the 79<i>FillOrder</i> tag is opposite to the native machine bit 80order. 16- and 32-bit samples are automatically byte-swapped 81if the file was written with a byte order opposite to the 82native machine byte order,</p> 83 84<p style="margin-left:11%; margin-top: 1em">In C++ the 85<i>sample</i> parameter defaults to 0.</p> 86 87<a name="RETURN VALUES"></a> 88<h2>RETURN VALUES</h2> 89 90 91 92<p style="margin-left:11%; margin-top: 1em"><i>TIFFReadScanline</i> 93returns −1 if it detects an error; otherwise 1 is 94returned.</p> 95 96<a name="DIAGNOSTICS"></a> 97<h2>DIAGNOSTICS</h2> 98 99 100<p style="margin-left:11%; margin-top: 1em">All error 101messages are directed to the <i>TIFFError</i>(3TIFF) 102routine.</p> 103 104<p style="margin-left:11%; margin-top: 1em"><b>Compression 105algorithm does not support random access</b>. Data was 106requested in a non-sequential order from a file that uses a 107compression algorithm and that has <i>RowsPerStrip</i> 108greater than one. That is, data in the image is stored in a 109compressed form, and with multiple rows packed into a strip. 110In this case, the library does not support random access to 111the data. The data should either be accessed sequentially, 112or the file should be converted so that each strip is made 113up of one row of data.</p> 114 115<a name="BUGS"></a> 116<h2>BUGS</h2> 117 118 119<p style="margin-left:11%; margin-top: 1em">Reading 120subsampled YCbCR data does not work correctly because, for 121<i>PlanarConfiguration</i>=2 the size of a scanline is not 122calculated on a per-sample basis, and for 123<i>PlanarConfiguration</i>=1 the library does not unpack the 124block-interleaved samples; use the strip- and tile-based 125interfaces to read these formats.</p> 126 127<a name="SEE ALSO"></a> 128<h2>SEE ALSO</h2> 129 130 131 132<p style="margin-left:11%; margin-top: 1em"><b>TIFFOpen</b>(3TIFF), 133<b>TIFFReadEncodedStrip</b>(3TIFF), 134<b>TIFFReadRawStrip</b>(3TIFF), <b>libtiff</b>(3TIFF)</p> 135 136<p style="margin-left:11%; margin-top: 1em">Libtiff library 137home page: <b>http://www.remotesensing.org/libtiff/</b></p> 138<hr> 139</body> 140</html> 141