1SWAB(3TIFF) SWAB(3TIFF)
2
3
4
6 TIFFGetBitRevTable, TIFFReverseBits, TIFFSwabShort, TIFFSwabLong, TIFF‐
7 SwabArrayOfShort, TIFFSwabArrayOfLong - byte- and bit-swapping routines
8
10 #include <tiffio.h>
11
12 const unsigned char* TIFFGetBitRevTable(int reversed)
13 void TIFFReverseBits(u_char *data, unsigned long nbytes)
14 void TIFFSwabShort(uint16 *data)
15 void TIFFSwabLong(uint32 *data)
16 void TIFFSwabArrayOfShort(uint16 *data, unsigned long nshorts)
17 void TIFFSwabArrayOfLong(uint32 *data, unsigned long nlongs)
18
20 The following routines are used by the library to swap 16- and 32-bit
21 data and to reverse the order of bits in bytes.
22
23 TIFFSwabShort and TIFFSwabLong swap the bytes in a single 16-bit and
24 32-bit item, respectively. TIFFSwabArrayOfShort and TIFFSwabArrayOf‐
25 Long swap the bytes in an array of 16-bit and 32-bit items, respec‐
26 tively.
27
28 TIFFReverseBits replaces each byte in data with the equivalent bit-
29 reversed value. This operation is performed with a lookup table, which
30 is returned using the TIFFGetBitRevTable function. reversed parameter
31 specifies which table should be returned. Supply 1 if you want bit
32 reversal table. Supply 0 to get the table that do not reverse bit val‐
33 ues. It is a lookup table that can be used as an identity function;
34 i.e. TIFFNoBitRevTable[n] == n.
35
37 None.
38
40 libtiff(3TIFF)
41
42 Libtiff library home page: http://www.remotesensing.org/libtiff/
43
44
45
46libtiff November 04, 2004 SWAB(3TIFF)