bitmap
Convert fonts between bitmap formats
SYNOPSIS
bitmap [-bd display] [-fg color] [-bg color] [-rv] [-bw pixels] [-size N] [-geometry geometry] [-help] [-name string] [filename]
PARAMETERS
-bd display
Connects to the specified X display server.
-fg color
Sets foreground (set-pixel) color name.
-bg color
Sets background (clear-pixel) color name.
-rv
Reverses foreground and background colors (reverse video).
-bw pixels
Sets window border width in pixels.
-size N
Initializes grid to N x N pixels (default 32).
-geometry geometry
Specifies window geometry (e.g., 400x400).
-help
Prints usage summary and exits.
-name string
Sets application name for window title.
DESCRIPTION
The bitmap command is a simple, interactive tool for creating, editing, and viewing monochrome bitmaps in the X Window System. It provides a grid-based interface where users can set or clear individual pixels using the mouse or keyboard. Bitmaps are saved in the standard .xbm (X Bitmap) format, which is text-based and includes C-style header definitions suitable for inclusion in X programs.
Upon launch, bitmap displays a resizable grid (default 32x32 pixels) with zoom capabilities up to 16x magnification. Users can draw with the left mouse button (set pixel), right button (clear pixel), or middle button (invert). Keyboard shortcuts allow filling regions, inverting selections, and more. Menus offer options for loading/saving files, setting grid size, and customizing colors. It supports multiple undos and is ideal for designing icons or cursors for X11 applications.
While lightweight and precise for pixel art, it is limited to black-and-white images and lacks advanced features like layers or color support found in modern editors. Commonly used in legacy X11 development or for quick prototyping of small graphics.
CAVEATS
Limited to monochrome bitmaps; no color or layered editing. Deprecated for modern use; requires X11. Filename argument loads existing .xbm file.
OUTPUT FORMAT
Saves as .xbm: C header with #define width/height and hex pixel array.
KEYBOARD SHORTCUTS
Space: set pixel; Backspace: clear; Ctrl+Z: undo; Ctrl+F: fill; arrows: move cursor.
HISTORY
Developed in the 1980s as part of the core X11 release (X11R1-R4). Maintained in xbitmaps/x11-apps packages across Linux distros. Usage peaked in early X programming; now niche for legacy icons.


