.xbm.xpm.wbmp
XBM, XPM and WBMP files: what they are and how to open them
XBM and XPM files are small icons and cursors from the X Window System, written as C source code; WBMP is the black and white image format of early WAP phones. Open them free in GIMP, or in Universal File Opener on Android or Windows.
Drop your XBM file here
Opens on this device. Nothing is uploaded. Any other file works too.
What is an XBM file?
XBM (X BitMap) is the black and white bitmap format of the X Window System, the graphics system of Unix workstations, used for cursors and icons. The file is a piece of C code, so a program can compile the picture straight into itself. It was also one of the first two image formats on the web, with GIF.
XPM (X PixMap) brings color and transparency the same way. Daniel Dardailler and Colas Nahaboo wrote the first version in 1989, and Arnaud Le Hors at Groupe Bull developed XPM 3, the version in use today. WBMP (Wireless Bitmap) was defined by the WAP Forum for the small screens of WAP phones, and its media type was registered in 1999.
All three are rare now: you meet them in old Unix and Linux software, icon collections and archived phone content. Two facts explain most problems. XBM and XPM open in a text editor as code, and modern browsers stopped showing XBM years ago; Firefox dropped it after version 3.5.
What is inside
An XBM file is C source: two #define lines give the width and height, two more can give a cursor’s hotspot, and an array of bytes holds the pixels, 8 to a byte, 1 bit each. XPM is also C, an array of strings: the width, height, number of colors and characters per pixel, then one line per color (None means transparent), then one string per row of pixels.
WBMP is binary. Type 0, the only type defined, starts with a type byte and a header byte, then the width and height as variable-length numbers, then rows of 1-bit pixels with no compression. White is 1 and black is 0, the reverse of PBM.
arrow.xbm#define arrow_width 16width in pixels#define arrow_height 16height in pixels#define arrow_x_hot 1optional hotspot, for cursors#define arrow_y_hot 1static unsigned char arrow_bits[] = { 0x00, 0x00, 0x02, 0x00, …8 pixels per byte, 32 bytes in all};How to open an XBM file
Windows
- GIMPFree. Opens and exports XBM and XPM, and imports WBMP.
- IrfanViewFree for non-commercial use. Reads XBM, XPM and WBMP once its free plugin pack is installed.
- Universal File Opener for WindowsOursOpens XBM, XPM and WBMP images and saves a PNG, JPEG or BMP copy.
Mac
- GIMPFree. Opens and exports XBM and imports WBMP.
- XnView MPFree for private use. Lists XBM, XPM and WBMP among its more than 500 formats.
Android
- Universal File OpenerOursOpens all three and edits them. Saves XBM, XPM or WBMP again, or converts a copy to PNG or JPEG.
In a browser
- Chrome, Edge, Firefox and SafariModern browsers no longer show XBM, and XPM and WBMP are not web image formats. Open the file in one of the apps above.
Won’t open?
It opens as C code
That is the file: XBM and XPM store the picture as C source, so text and code editors show code. Open it in GIMP, IrfanView or Universal File Opener to see the image.
An old web page shows a broken image
Modern browsers no longer show XBM. Convert the image to PNG (in GIMP, File, Export As) and point the page’s image tag at the PNG.
IrfanView will not open it
IrfanView reads XBM, XPM and WBMP only through plugins. Install the free plugin pack from the IrfanView website, then open the file again.
Saving as XBM or WBMP made it black and white
Both formats hold 1 bit per pixel, so every color becomes black or white. Keep color work in PNG or XPM and save XBM or WBMP last, from a copy.
Convert an XBM file
- To PNG, in GIMPOpen the file, choose File, Export As, type a name ending in .png and click Export. PNG keeps XPM transparency.
- To PNG or JPEG, on AndroidOpen the file in Universal File Opener, tap Edit, choose Convert to and pick PNG or JPEG.
- To XBM, XPM or WBMP from another imageIn Universal File Opener on Android, open a PNG or JPEG, tap Edit, choose Convert to and pick the format. XBM and WBMP come out black and white.
XBM files in our apps
Universal File Opener opens XBM, XPM and WBMP images on Android and Windows. On Android, edit and save them in their own formats or convert a copy to PNG or JPEG; XBM and WBMP output is black and white.
All Android tools and limits for XBM files
- Decode and view all three; edit in the full editor.
- Save monochrome XBM, XPM3 with binary transparency, or WBMP Type 0 output.
- Convert to PNG or JPEG, or create these formats from supported raster images.
Limits
- XBM and WBMP store monochrome pixels. Saving in these formats converts colors to black and white.
Walkthrough: Edit and convert images on Android