TIFFReadScanline.3tiff.html 5.1 KB

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