Blame man/TIFFswab.3tiff

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