raw2biff
[ XITE Reference Manual | XITE home ]
Contents
Name
raw2biff - convert raw data to BIFF file
raw2biff [-t title] [-pt pixel_type] [-org orgtype] \\
[-swap] [-ih <ih>] [-bh <bh>] [-ba <ba>] \\
[-lh <lh>] [-la <la>] \\
<raw-file> <BIFF-file> <xsize> <ysize> [<bands>]
Converts a raw data file, raw-file into a BIFF output file,
BIFF-file. xsize and ysize give the horizontal and
vertical size (number of pixels) of the image. bands denotes
the number of bands/frames in the input image (default 1).
-
-t title
- Set the output image title to title.
-
-pt pixel_type
- One of
-
ub
- Unsigned byte, default.
-
sb
- Signed byte, 8 bits.
-
us
- Unsigned short, 16 bits.
-
ss
- Signed short, 16 bits.
-
i
- Signed integer, 32 bits.
-
r
- Real (float), 32 bits.
-
bl
- Bit - least significant bit first.
-
bm
- Bit - most significant bit first.
-
-org orgtype
- How the pixels are organized, one of
-
bls
- Band-line-sample (default).
-
lbs
- Line-band-sample.
-
lsb
- Line-sample-band
-
-swap
- Swap byte order.
-
-ih ih
- Number of bytes to skip for image header. Default 0.
-
-bh bh
- Number of bytes to skip for band header. Default 0.
-
-ba ba
- Number of bytes to skip "after" each band for alignment.
Default 0.
-
-lh lh
- Number of bytes to skip for line header. Default 0.
-
-la la
- Number of bytes to skip "after" each line for alignment.
Default 0.
The input file must thus follow this format:
1) <ih> bytes in image header
2) <bh> bytes in band header
3) <lh> bytes in line header
4) <xsize> pixels in 1. line
5) <la> bytes for line alignment
6-8) like 3 to 5 for line 2
9-?) and so on for each line up to <ysize>
??) <ba> bytes for band alignment
???) like 2 to ?? for band 2
????) and so on for every band up to <bands>
After all pixel data have been read, the input file is closed,
the last remaining alignment bytes are not required.
If more than one band, all bands must have the same size and
pixel type.
When 16 or 32 bits raw files are given, raw2biff assumes the
input file is from a machine with same bytesex/byteordering as
the one running raw2biff. Use option -swap to change the
byteordering.
Tor Lønnestad, BLAB, Ifi, UiO
$Id: raw2biff.c,v 1.38 1997/03/24 10:11:53 svein Exp $
raw2biff -ih 512 any.dat mona.img 512 512