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