3
<meta name="generator" content="groff -Thtml, see www.gnu.org">
4
<meta name="Content-Style" content="text/css">
9
<h1 align=center>SWAB</h1>
10
<a href="#NAME">NAME</a><br>
11
<a href="#SYNOPSIS">SYNOPSIS</a><br>
12
<a href="#DESCRIPTION">DESCRIPTION</a><br>
13
<a href="#DIAGNOSTICS">DIAGNOSTICS</a><br>
14
<a href="#SEE ALSO">SEE ALSO</a><br>
17
<!-- Creator : groff version 1.17.2 -->
18
<!-- CreationDate: Mon Dec 22 00:39:27 2003 -->
21
<table width="100%" border=0 rules="none" frame="void"
22
cols="2" cellspacing="0" cellpadding="0">
23
<tr valign="top" align="left">
24
<td width="10%"></td><td width="90%">
25
TIFFReverseBits, TIFFSwabShort, TIFFSwabLong, TIFFSwabArrayOfShort, TIFFSwabArrayOfLong - byte- and bit-swapping routines</td></table>
26
<a name="SYNOPSIS"></a>
29
<table width="100%" border=0 rules="none" frame="void"
30
cols="2" cellspacing="0" cellpadding="0">
31
<tr valign="top" align="left">
32
<td width="10%"></td><td width="90%">
33
<b>#include <tiffio.h><br>
34
const unsigned char* TIFFGetBitRevTable(int reversed);<br>
35
void TIFFReverseBits(u_char* data, unsigned long nbytes)<br>
36
void TIFFSwabShort(uint16* data)<br>
37
void TIFFSwabLong(uint32* data)<br>
38
void TIFFSwabArrayOfShort(uint16* data, unsigned long
40
void TIFFSwabArrayOfLong(uint32* data, unsigned long
41
nlongs)</b></td></table>
42
<a name="DESCRIPTION"></a>
45
<table width="100%" border=0 rules="none" frame="void"
46
cols="2" cellspacing="0" cellpadding="0">
47
<tr valign="top" align="left">
48
<td width="10%"></td><td width="90%">
49
The following routines are used by the library to swap 16-
50
and 32-bit data and to reverse the order of bits in
53
<table width="100%" border=0 rules="none" frame="void"
54
cols="2" cellspacing="0" cellpadding="0">
55
<tr valign="top" align="left">
56
<td width="10%"></td><td width="90%">
57
<i>TIFFSwabShort</i> and <i>TIFFSwabLong</i> swap the bytes
58
in a single 16-bit and 32-bit item, respectively.
59
<i>TIFFSwabArrayOfShort</i> and <i>TIFFSwabArrayOfLong</i>
60
swap the bytes in an array of 16-bit and 32-bit items,
61
respectively.</td></table>
63
<table width="100%" border=0 rules="none" frame="void"
64
cols="2" cellspacing="0" cellpadding="0">
65
<tr valign="top" align="left">
66
<td width="10%"></td><td width="90%">
67
<i>TIFFReverseBits</i> replaces each byte in <i>data</i>
68
with the equivalent bit-reversed value. This operation is
69
done with a lookup table, <i>TIFFBitRevTable</i> which is
70
declared public. A second table, <i>TIFFNoBitRevTable</i> is
71
also declared public; it is a lookup table that can be used
72
as an <i>identity function</i>; i.e. <i>TIFFNoBitRevTable[n]
73
== n</i>.</td></table>
74
<a name="DIAGNOSTICS"></a>
77
<table width="100%" border=0 rules="none" frame="void"
78
cols="2" cellspacing="0" cellpadding="0">
79
<tr valign="top" align="left">
80
<td width="10%"></td><td width="90%">
82
<a name="SEE ALSO"></a>
85
<table width="100%" border=0 rules="none" frame="void"
86
cols="2" cellspacing="0" cellpadding="0">
87
<tr valign="top" align="left">
88
<td width="10%"></td><td width="90%">
89
<i>libtiff</i>(3T),</td></table>