XPM
Also known as: X PixMap, .xpm file, X11 pixmap
XPM (X PixMap) is a color image format from the X Window System, also written as C source code. It maps each character in a text grid to a color, letting developers embed small color icons directly into programs.
- Color X11 image written as C code
- Maps characters to colors in a text grid
- Successor to XBM; replaced by PNG and SVG
How XPM works
An XPM file is a C array of strings: a color table assigns characters to colors, then rows of characters draw the image. This made it readable and editable as plain text.
It extends the older XBM from black-and-white to full color, and even supports a transparent color, so it was widely used for X11 application icons.
XPM today
XPM still turns up in older Linux and Unix software, but new projects use PNG or SVG for icons. Convert legacy XPM artwork to PNG when you need it elsewhere.