IT lexicon › Web › XBM

XBM

Web På svenska → Updated: 2026-10-07

X's format for monochrome bitmaps, stored as C source code that can be included straight into a program.

An XBM file isn't binary at all but a chunk of C: two #defines for width and height and a static char name_bits[] array in which each bit is a pixel. Icons, cursors and patterns could therefore be compiled into a program with a plain #include and turned into a pixmap with a single Xlib call. X's bitmap program was the editor.

It had no colour, which XPM added around 1989. It also got an unexpected second life on the web: NCSA Mosaic and early Netscape displayed XBM inline alongside GIF, since it was a format X-based browsers already understood. Parsing C code inside a web browser turned out to be a poor idea, and support was removed during the 2000s.

← Back to the lexicon