TIFFswab.3tiff.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <!-- Creator : groff version 1.18.1 -->
  2. <!-- CreationDate: Sat Feb 24 18:37:18 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>SWAB</title>
  8. </head>
  9. <body>
  10. <h1 align=center>SWAB</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="#DIAGNOSTICS">DIAGNOSTICS</a><br>
  15. <a href="#SEE ALSO">SEE ALSO</a><br>
  16. <hr>
  17. <a name="NAME"></a>
  18. <h2>NAME</h2>
  19. <!-- INDENTATION -->
  20. <table width="100%" border=0 rules="none" frame="void"
  21. cols="2" cellspacing="0" cellpadding="0">
  22. <tr valign="top" align="left">
  23. <td width="8%"></td>
  24. <td width="91%">
  25. <p>TIFFGetBitRevTable, TIFFReverseBits, TIFFSwabShort,
  26. TIFFSwabLong, TIFFSwabArrayOfShort, TIFFSwabArrayOfLong
  27. &minus; byte- and bit-swapping routines</p>
  28. </td>
  29. </table>
  30. <a name="SYNOPSIS"></a>
  31. <h2>SYNOPSIS</h2>
  32. <!-- INDENTATION -->
  33. <table width="100%" border=0 rules="none" frame="void"
  34. cols="2" cellspacing="0" cellpadding="0">
  35. <tr valign="top" align="left">
  36. <td width="8%"></td>
  37. <td width="91%">
  38. <p><b>#include &lt;tiffio.h&gt;</b></p>
  39. <!-- INDENTATION -->
  40. <p><b>const unsigned char* TIFFGetBitRevTable(int</b>
  41. <i>reversed</i><b>)<br>
  42. void TIFFReverseBits(u_char *</b><i>data</i><b>, unsigned
  43. long</b> <i>nbytes</i><b>)<br>
  44. void TIFFSwabShort(uint16_t *</b><i>data</i><b>)<br>
  45. void TIFFSwabLong(uint32_t *</b><i>data</i><b>)<br>
  46. void TIFFSwabArrayOfShort(uint16_t *</b><i>data</i><b>,
  47. unsigned long</b> <i>nshorts</i><b>)<br>
  48. void TIFFSwabArrayOfLong(uint32_t *</b><i>data</i><b>,
  49. unsigned long</b> <i>nlongs</i><b>)</b></p>
  50. </td>
  51. </table>
  52. <a name="DESCRIPTION"></a>
  53. <h2>DESCRIPTION</h2>
  54. <!-- INDENTATION -->
  55. <table width="100%" border=0 rules="none" frame="void"
  56. cols="2" cellspacing="0" cellpadding="0">
  57. <tr valign="top" align="left">
  58. <td width="8%"></td>
  59. <td width="91%">
  60. <p>The following routines are used by the library to swap
  61. 16- and 32-bit data and to reverse the order of bits in
  62. bytes.</p>
  63. <!-- INDENTATION -->
  64. <p><i>TIFFSwabShort</i> and <i>TIFFSwabLong</i> swap the
  65. bytes in a single 16-bit and 32-bit item, respectively.
  66. <i>TIFFSwabArrayOfShort</i> and <i>TIFFSwabArrayOfLong</i>
  67. swap the bytes in an array of 16-bit and 32-bit items,
  68. respectively.</p>
  69. <!-- INDENTATION -->
  70. <p><i>TIFFReverseBits</i> replaces each byte in <i>data</i>
  71. with the equivalent bit-reversed value. This operation is
  72. performed with a lookup table, which is returned using the
  73. <i>TIFFGetBitRevTable</i> function. <i>reversed</i>
  74. parameter specifies which table should be returned. Supply
  75. <i>1</i> if you want bit reversal table. Supply <i>0</i> to
  76. get the table that do not reverse bit values. It is a lookup
  77. table that can be used as an <i>identity function</i>; i.e.
  78. <i>TIFFNoBitRevTable[n] == n</i>.</p>
  79. </td>
  80. </table>
  81. <a name="DIAGNOSTICS"></a>
  82. <h2>DIAGNOSTICS</h2>
  83. <!-- INDENTATION -->
  84. <table width="100%" border=0 rules="none" frame="void"
  85. cols="2" cellspacing="0" cellpadding="0">
  86. <tr valign="top" align="left">
  87. <td width="8%"></td>
  88. <td width="91%">
  89. <p>None.</p>
  90. </td>
  91. </table>
  92. <a name="SEE ALSO"></a>
  93. <h2>SEE ALSO</h2>
  94. <!-- INDENTATION -->
  95. <table width="100%" border=0 rules="none" frame="void"
  96. cols="2" cellspacing="0" cellpadding="0">
  97. <tr valign="top" align="left">
  98. <td width="8%"></td>
  99. <td width="91%">
  100. <p><b>libtiff</b>(3TIFF)</p>
  101. <!-- INDENTATION -->
  102. <p>Libtiff library home page:
  103. <b>http://www.simplesystems.org/libtiff/</b></p>
  104. </td>
  105. </table>
  106. <hr>
  107. </body>
  108. </html>