Provided by: sam_4.3-18.2_i386 bitmap - external format for
bitmaps #include <libc.h> #include <libg.h> Bitmaps are
described in graphics(3g). Fonts and bitmaps are stored in
external files in machine-independent formats. Bitmap files are
read and written using rdbitmapfile and wrbitmapfile (see
balloc(3g)). A bitmap file starts with 5 decimal strings:
ldepth, r.min.x, r.min.y, r.max.x, and r.max.y. Each number is
right-justified and blank padded in 11 characters, followed by a
blank. The rest of the file contains the r.max.y-r.min.y rows of
bitmap data. A row consists of the byte containing pixel r.min.x
and all the bytes up to and including the byte containing pixel
r.max.x−1. A pixel with x- coordinate = x in a bitmap with
ldepth = l will appear as w = 2^l contiguous bits in a byte,
with the pixel’s high order bit starting at the byte’s bit
number w*(x mod 8/w), where bits within a byte are numbered 0 to
7 from the high order to the low order bit. If w is greater than
8, it is a multiple of 8, so pixel val