1SWAB(3TIFF)                                                        SWAB(3TIFF)
2
3
4

NAME

6       TIFFGetBitRevTable, TIFFReverseBits, TIFFSwabShort, TIFFSwabLong, TIFF‐
7       SwabArrayOfShort, TIFFSwabArrayOfLong - byte- and bit-swapping routines
8

SYNOPSIS

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_t *data)
15       void TIFFSwabLong(uint32_t *data)
16       void TIFFSwabArrayOfShort(uint16_t *data, unsigned long nshorts)
17       void TIFFSwabArrayOfLong(uint32_t *data, unsigned long nlongs)
18

DESCRIPTION

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-re‐
29       versed value. This operation is performed with a lookup table, which is
30       returned using the  TIFFGetBitRevTable  function.   reversed  parameter
31       specifies  which table should be returned. Supply 1 if you want bit re‐
32       versal table. Supply 0 to get the table that do not reverse bit values.
33       It  is  a  lookup  table that can be used as an identity function; i.e.
34       TIFFNoBitRevTable[n] == n.
35

DIAGNOSTICS

37       None.
38

SEE ALSO

40       libtiff(3TIFF)
41
42       Libtiff library home page: http://www.simplesystems.org/libtiff/
43
44
45
46libtiff                        November 04, 2004                   SWAB(3TIFF)
Impressum