XBM
Also known as: X BitMap, .xbm file, X11 bitmap
XBM (X BitMap) is a monochrome image format from the X Window System that is written as C source code. The file is literally a small C array defining a 1-bit image, which made it easy to compile icons directly into programs.
- Monochrome X11 image written as C code
- 1-bit pixels, no color or grayscale
- Mostly legacy; replaced by PNG and SVG
How XBM works
An XBM file is plain text containing a C array of bytes plus width and height. Each bit is one black-or-white pixel, so it carries no color or grayscale.
Because it is source code, developers could embed XBM icons and cursors straight into X11 applications without a separate image loader.
XBM today
XBM is largely a relic of early Unix desktops. For modern icons, use PNG or SVG; convert any old XBM you need to keep into PNG.