biffswap
[ XITE Reference Manual | XITE home ]
Name
biffswap - swap byte order for bands in biff-file
Syntax
biffswap <infile> <outfile>
Description
Swap byte order for bands in biff-file. Works for all pixel
types, including complex and double complex.
There is usually no need to use this program, because XITE
takes care of swapping bytes automatically. If an image
(with multi-byte pixeltype) is written with an XITE version
prior to 3.0 and read with version 3.0 or later, or vice
versa, use the following procedure.
-
Determine the version of your XITE copy either by running
- xshow with option -ver or by reading the file
$XITE_HOME/etc/.install/VERSION. If the option is not
recognized and the file does not exist, the version number
is less than 3.0.
-
Determine the endian-ness of the writing and reading hosts.
- Examples of little-endian computers: DecStation, Dec alpha,
PC (Intel x86).
Examples of big-endian computers: Sun, Silicon Graphics.
-
Image written with version < 3.0, read with version >= 3.0
- If the writing host was little-endian, convert the image
first with the biffswap program (of version >= 3.0) on the
reading host (regardless of reading host's endian-ness).
Otherwise, no explicit conversion is necessary.
-
Image written with version >= 3.0, read with version < 3.0
- This should not happen too often.
-
Writing host was little-endian
- With a little-endian reading-host, convert the image with
biffswap (of version >= 3.0) on a big-endian machine.
With a big-endian reading-host, the image can not be used.
In this case, solve your problem by upgrading XITE on the
reading-host.
-
Writing host was big-endian
- With a little-endian reading-host, convert the image with
biffswap (of version >= 3.0) on a big-endian host or with
biffswap (of version < 3.0) on a little-endian host.
With a big-endian reading-host, no explicit conversion is
necessary.
Return value
0
See also
biff_swap(3)
Author
Otto Milvang
Id
$Id: biffswap.c,v 1.17 1996/11/08 14:02:55 svein Exp $