|
roentgen |
b75cab |
.\" $Id: TIFFswab.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" Copyright (c) 1988-1997 Sam Leffler
|
|
roentgen |
b75cab |
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" Permission to use, copy, modify, distribute, and sell this software and
|
|
roentgen |
b75cab |
.\" its documentation for any purpose is hereby granted without fee, provided
|
|
roentgen |
b75cab |
.\" that (i) the above copyright notices and this permission notice appear in
|
|
roentgen |
b75cab |
.\" all copies of the software and related documentation, and (ii) the names of
|
|
roentgen |
b75cab |
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
|
|
roentgen |
b75cab |
.\" publicity relating to the software without the specific, prior written
|
|
roentgen |
b75cab |
.\" permission of Sam Leffler and Silicon Graphics.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
|
roentgen |
b75cab |
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
roentgen |
b75cab |
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
|
|
roentgen |
b75cab |
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
|
roentgen |
b75cab |
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
roentgen |
b75cab |
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
|
roentgen |
b75cab |
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
roentgen |
b75cab |
.\" OF THIS SOFTWARE.
|
|
roentgen |
b75cab |
.\"
|
|
roentgen |
b75cab |
.if n .po 0
|
|
roentgen |
b75cab |
.TH SWAB 3TIFF "November 04, 2004" "libtiff"
|
|
roentgen |
b75cab |
.SH NAME
|
|
roentgen |
b75cab |
TIFFGetBitRevTable, TIFFReverseBits, TIFFSwabShort, TIFFSwabLong,
|
|
roentgen |
b75cab |
TIFFSwabArrayOfShort, TIFFSwabArrayOfLong \- byte- and bit-swapping routines
|
|
roentgen |
b75cab |
.SH SYNOPSIS
|
|
roentgen |
b75cab |
.B "#include <tiffio.h>"</tiffio.h>
|
|
roentgen |
b75cab |
.sp
|
|
roentgen |
b75cab |
.BI "const unsigned char* TIFFGetBitRevTable(int " reversed ")"
|
|
roentgen |
b75cab |
.br
|
|
roentgen |
b75cab |
.BI "void TIFFReverseBits(u_char *" data ", unsigned long " nbytes ")"
|
|
roentgen |
b75cab |
.br
|
|
roentgen |
b75cab |
.BI "void TIFFSwabShort(uint16 *" data ")"
|
|
roentgen |
b75cab |
.br
|
|
roentgen |
b75cab |
.BI "void TIFFSwabLong(uint32 *" data ")"
|
|
roentgen |
b75cab |
.br
|
|
roentgen |
b75cab |
.BI "void TIFFSwabArrayOfShort(uint16 *" data ", unsigned long " nshorts ")"
|
|
roentgen |
b75cab |
.br
|
|
roentgen |
b75cab |
.BI "void TIFFSwabArrayOfLong(uint32 *" data ", unsigned long " nlongs ")"
|
|
roentgen |
b75cab |
.SH DESCRIPTION
|
|
roentgen |
b75cab |
The following routines are used by the library to swap
|
|
roentgen |
b75cab |
16- and 32-bit data and to reverse the order of bits in bytes.
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
.IR TIFFSwabShort
|
|
roentgen |
b75cab |
and
|
|
roentgen |
b75cab |
.IR TIFFSwabLong
|
|
roentgen |
b75cab |
swap the bytes in a single 16-bit and 32-bit item, respectively.
|
|
roentgen |
b75cab |
.IR TIFFSwabArrayOfShort
|
|
roentgen |
b75cab |
and
|
|
roentgen |
b75cab |
.IR TIFFSwabArrayOfLong
|
|
roentgen |
b75cab |
swap the bytes in an array of 16-bit and 32-bit items, respectively.
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
.IR TIFFReverseBits
|
|
roentgen |
b75cab |
replaces each byte in
|
|
roentgen |
b75cab |
.I data
|
|
roentgen |
b75cab |
with the equivalent bit-reversed value. This operation is performed with a
|
|
roentgen |
b75cab |
lookup table, which is returned using the
|
|
roentgen |
b75cab |
.IR TIFFGetBitRevTable
|
|
roentgen |
b75cab |
function.
|
|
roentgen |
b75cab |
.I reversed
|
|
roentgen |
b75cab |
parameter specifies which table should be returned. Supply
|
|
roentgen |
b75cab |
.I 1
|
|
roentgen |
b75cab |
if you want bit reversal table. Supply
|
|
roentgen |
b75cab |
.I 0
|
|
roentgen |
b75cab |
to get the table that do not reverse bit values. It is a lookup table that can
|
|
roentgen |
b75cab |
be used as an
|
|
roentgen |
b75cab |
.IR "identity function" ;
|
|
roentgen |
b75cab |
i.e.
|
|
roentgen |
b75cab |
.IR "TIFFNoBitRevTable[n] == n" .
|
|
roentgen |
b75cab |
.SH DIAGNOSTICS
|
|
roentgen |
b75cab |
None.
|
|
roentgen |
b75cab |
.SH "SEE ALSO"
|
|
roentgen |
b75cab |
.BR libtiff (3TIFF)
|
|
roentgen |
b75cab |
.PP
|
|
roentgen |
b75cab |
Libtiff library home page:
|
|
roentgen |
b75cab |
.BR http://www.remotesensing.org/libtiff/
|