Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

bitmap(6) [plan9 man page]

BITMAP(6)							   Games Manual 							 BITMAP(6)

NAME
bitmap - external format for bitmaps SYNOPSIS
#include <libg.h> DESCRIPTION
Bitmaps are described in graphics(2). Fonts and bitmaps are stored in external files in machine-independent formats. Bitmap files are read and written using rdbitmapfile and wrbitmapfile (see balloc(2)). 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 = ld will appear as w = 2^ld 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 values take up an integral number of bytes. Rows contain integral number of bytes, so there may be some unused pixels at either end of a row. The rdbitmap and wrbitmap functions described in balloc(2) also deal with rows in this format, stored in user memory. Some small images, in particular 48x48 face files as used by seemail (see mail(1)) and 16x16 cursors, can be stored textually, suitable for inclusion in C source. Each line of text represents one scan line as a comma-separated sequence of hexadecimal bytes, shorts, or words in C format. For cursors, each line defines a pair of bytes. (It takes two images to define a cursor; each must be stored separately to be processed by programs such as tweak(1).) Face files of one bit per pixel are stored as a sequence of shorts, those of larger pixel sizes as a sequence of longs. Software that reads these files must deduce the image size from the input; there is no header. These formats reflect history rather than design. SEE ALSO
tweak(1), graphics(2), bitblt(2), balloc(2), face(6), font(6) BITMAP(6)

Check Out this Related Man Page

FACE(6) 							   Games Manual 							   FACE(6)

NAME
face - face files DESCRIPTION
The directory /lib/face contains a hierarchy of images of people. In that directory are subdirectories named by the sizes of the corre- sponding image files: 48x48x1 (48 by 48 pixels, one bit per pixel); 48x48x2 (48 by 48 pixels, two bits per pixel); 512x512x8 (512 by 512 pixels, eight bits per pixel); 512x512x24 (512 by 512 pixels, twenty-four bits per pixel (3 times 8 bits per color)). The large files serve no special purpose; they are stored either as bitmaps (see bitmap(6)) or as picture files (see picfile(9.6). The small files are the `icons' displayed by seemail (see mail(1)); their format is special. Icons are stored as text, one line of the file to one scan line of display. Each line is divided into 8-bit, 16-bit, or 32-bit big-endian words, stored as a list of comma-separated hexadecimal C constants, such as: 0x9200, 0x1bb0, 0x003e, This odd format is historical and the programs that read it are somewhat forgiving about blanks and the need for commas. The files /lib/face/*/.dict hold a correspondence between users at machines and face files. The format is machine/user directory/file.ver The machine is the domain name of the machine sending the message, and user the name of the user sending it, as recorded in /sys/log/mail. The directory is a further subdirectory of (say) /lib/face/48x48x1, named by a single letter corresponding to the first character of the user names. The file is the name of the file, typically but not always the user name, and ver is a number to distinguish different images, for example to distinguish the image for Bill Gates from the image for Bill Joy, both of which might otherwise be called b/bill. For exam- ple, Bill Gates might be represented by the line microsoft.com/bill b/bill.1 If multiple entries exist for a user in the various .dict files, seemail chooses the highest pixel size less than or equal to that of the display on which it is running. Finally, or rather firstly, the file /lib/face/.machinelist contains a list of machine/domain pairs, one per line, to map any of a set of machines to a single domain name to be looked up in the .dict files. The machine name may be a regular expression, so for example the entry .*research.att.com astro maps any of the machines in AT&T Research into the shorthand name astro, which then appears as a domain name in the .dict files. SEE ALSO
mail(1), tweak(1), bitmap(6) FACE(6)
Man Page