V8/usr/man/man9/bitfile.9
.TH BITFILE 9.5
.SH NAME
bitfile \- format of bitmap file
.SH DESCRIPTION
Binary files produced by
.IR blitblt (9.1),
.IR twid (9.6)
and other bitmap-generating programs
are formatted as follows:
.TP 12
.I Byte no.
.I Description
.TP
0, 1:
Zero.
.TP
2, 3:
X-coordinate of the rectangle origin (low-order byte, high-order byte).
.TP
4, 5:
Y-coordinate of the rectangle origin (low-order byte, high-order byte).
.TP
6, 7:
X-coordinate of the rectangle corner (low-order byte, high-order byte).
.TP
8, 9:
Y-coordinate of the rectangle corner (low-order byte, high-order byte).
.TP
remainder:
Compressed raster data. Each raster is exclusive-or'd
with the previous one, and
zero-extended (if necessary) to a 16-bit boundary. It is then encoded into
byte sequences, each of which consists of a control byte followed by
two or more data bytes:
.TP 12
.I Control
.I Data
.TP
.IR n " (< 127)"
.RI "2*" n
bytes of raster data, running from left to right.
.TP
.RI "0x80 + " n
2 bytes of raster data, to be replicated from left to right
.I n
times.
.LP
There are also two
.SM ASCII
formats in current use.
.IR Textures " and " "16\(mu16 icons",
typically created by
.IR icon (9.1),
are encoded as a
.IR Texture
declaration with initializer,
to be copied unchanged into C program source; see
.IR types (9.5).
.I Faces
and other
large icons
are without any surrounding C syntax.
In either case, each scan line of the
bitmap is a comma-separated list of C-style
.I short
hexadecimal constants; scan lines are separated by newlines.
.SH "SEE ALSO"
blitblt(9.1), icon(9.1), twid(9.1), types(9.5), sysmon(9.1), can(1)