1 <!-- Creator : groff version 1.18.1 -->
2 <!-- CreationDate: Sat Feb 24 18:37:18 2007 -->
5 <meta name=
"generator" content=
"groff -Thtml, see www.gnu.org">
6 <meta name=
"Content-Style" content=
"text/css">
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>
22 <table width=
"100%" border=
0 rules=
"none" frame=
"void"
23 cols=
"2" cellspacing=
"0" cellpadding=
"0">
24 <tr valign=
"top" align=
"left">
27 <p>TIFFGetBitRevTable, TIFFReverseBits, TIFFSwabShort,
28 TIFFSwabLong, TIFFSwabArrayOfShort, TIFFSwabArrayOfLong
29 − byte- and bit-swapping routines
</p>
32 <a name=
"SYNOPSIS"></a>
35 <table width=
"100%" border=
0 rules=
"none" frame=
"void"
36 cols=
"2" cellspacing=
"0" cellpadding=
"0">
37 <tr valign=
"top" align=
"left">
40 <p><b>#include
<tiffio.h
></b></p>
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>
54 <a name=
"DESCRIPTION"></a>
57 <table width=
"100%" border=
0 rules=
"none" frame=
"void"
58 cols=
"2" cellspacing=
"0" cellpadding=
"0">
59 <tr valign=
"top" align=
"left">
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
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,
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>
83 <a name=
"DIAGNOSTICS"></a>
86 <table width=
"100%" border=
0 rules=
"none" frame=
"void"
87 cols=
"2" cellspacing=
"0" cellpadding=
"0">
88 <tr valign=
"top" align=
"left">
94 <a name=
"SEE ALSO"></a>
97 <table width=
"100%" border=
0 rules=
"none" frame=
"void"
98 cols=
"2" cellspacing=
"0" cellpadding=
"0">
99 <tr valign=
"top" align=
"left">
102 <p><b>libtiff
</b>(
3TIFF)
</p>
104 <p>Libtiff library home page:
105 <b>http://www.remotesensing.org/libtiff/
</b></p>