XBM Format Guide

Available Conversions

Convert to XBM

ARW to XBM

Convert Sony RAW photos to XBM monochrome bitmaps for X11 applications

AVIF to XBM

Convert AVIF images to XBM for X Window System icon and cursor creation

BAY to XBM

Convert Casio RAW photos to XBM monochrome bitmaps for embedded systems

BLP to XBM

Convert Blizzard game textures to XBM for X11 bitmap integration

BMP to XBM

Convert BMP images to XBM for X Window System icons and cursors

CAP to XBM

Convert Phase One P-series RAW photos to XBM monochrome bitmaps

CR2 to XBM

Convert Canon RAW photos to XBM for X11 icon and cursor creation

CR3 to XBM

Convert Canon mirrorless RAW photos to XBM monochrome bitmaps

CRW to XBM

Convert Canon PowerShot RAW photos to XBM for X11 applications

CUR to XBM

Convert Windows Cursor to X BitMap format

DCR to XBM

Convert Kodak Professional RAW photos to XBM monochrome bitmaps

DCX to XBM

Convert Multi-page PCX to X BitMap format

DDS to XBM

Convert DirectDraw Surface textures to XBM for X Window System use

DNG to XBM

Convert Adobe DNG RAW files to XBM monochrome bitmaps for X11

EPS to XBM

Convert EPS print artwork to XBM for X Window System icon creation

ERF to XBM

Convert Epson RAW photos to XBM monochrome bitmaps for embedded systems

FFF to XBM

Convert Hasselblad/Imacon RAW photos to XBM for X11 applications

GIF to XBM

Convert GIF images to XBM monochrome bitmaps for X Window System

GPR to XBM

Convert GoPro action camera RAW photos to XBM monochrome bitmaps

HEIC to XBM

Convert Apple HEIC photos to XBM for X11 icon and cursor creation

ICO to XBM

Convert ICO icons to XBM for X Window System bitmap integration

ICNS to XBM

Convert ICNS macOS icons to XBM for X11 icon migration

IIQ to XBM

Convert Phase One RAW photos to XBM monochrome bitmaps for X11

JP2 to XBM

Convert JPEG 2000 images to XBM for X Window System applications

JPG to XBM

Convert JPEG photos to XBM monochrome bitmaps for X11 icons and cursors

KDC to XBM

Convert Kodak RAW photos to XBM for X Window System bitmap use

MEF to XBM

Convert Mamiya RAW photos to XBM monochrome bitmaps for embedded systems

MOS to XBM

Convert Leaf RAW photos to XBM for X11 icon and cursor creation

MRW to XBM

Convert Minolta RAW photos to XBM monochrome bitmaps for X11

NEF to XBM

Convert Nikon RAW photos to XBM for X Window System applications

NRW to XBM

Convert Nikon compact RAW photos to XBM monochrome bitmaps

ORF to XBM

Convert Olympus RAW photos to XBM for X11 bitmap integration

PCX to XBM

Convert ZSoft Paintbrush images to XBM for X Window System use

PEF to XBM

Convert Pentax RAW photos to XBM monochrome bitmaps for X11

PNG to XBM

Convert PNG images to XBM for X Window System icons and cursors

PPM to XBM

Convert Portable Pixmap images to XBM monochrome bitmaps for X11

PSD to XBM

Convert PSD Photoshop files to XBM for X Window System icon creation

PTX to XBM

Convert Pentax Optio RAW photos to XBM monochrome bitmaps

QOI to XBM

Convert QOI lossless images to XBM for X11 bitmap integration

RAF to XBM

Convert Fujifilm RAW photos to XBM monochrome bitmaps for X11

RW2 to XBM

Convert Panasonic RAW photos to XBM for X Window System applications

RWL to XBM

Convert Leica RAW photos to XBM monochrome bitmaps for X11

SR2 to XBM

Convert Sony RAW 2 photos to XBM for X Window System bitmap use

SRW to XBM

Convert Samsung RAW photos to XBM monochrome bitmaps for X11

SVG to XBM

Convert SVG vector graphics to XBM for X11 icon and cursor creation

TGA to XBM

Convert TGA textures to XBM monochrome bitmaps for X Window System

3FR to XBM

Convert Hasselblad RAW photos to XBM for X11 bitmap integration

TIFF to XBM

Convert TIFF images to XBM monochrome bitmaps for X Window System

WebP to XBM

Convert WebP images to XBM for X11 icon and cursor creation

X3F to XBM

Convert Sigma/Foveon RAW photos to XBM monochrome bitmaps for X11

SGI to XBM

Convert SGI images to XBM for X Window System bitmap integration

About XBM Format

XBM (X BitMap) is a monochrome bitmap image format created in 1985 by MIT and the X Consortium for the X Window System (X11), the standard graphical display framework for Unix and Linux systems. Unlike virtually all other image formats, XBM files are stored as plain C source code containing static arrays of unsigned character data that define bitmap pixel patterns. Each file declares width and height constants using #define preprocessor directives, followed by a static array of hexadecimal byte values representing the pixel data in row-major order, where each bit corresponds to a single pixel (1 = foreground, 0 = background). This unique text-based representation means XBM files can be directly #included in C and C++ programs and compiled as part of the application binary, eliminating the need for runtime file parsing or external image loading libraries. The format is strictly 1-bit monochrome, supporting only two colors (typically black and white), with no grayscale, color channels, or alpha transparency. XBM files use the .xbm file extension and have no magic number or binary header, as they are valid C source code that begins with #define statements.

History of XBM

The XBM format was introduced in 1985 as part of the X Window System (X11) developed at MIT's Project Athena, a joint project between MIT, Digital Equipment Corporation (DEC), and IBM to create a platform-independent graphical windowing system for networked computing. The format was designed to provide a simple, portable way to define bitmap patterns for window manager icons, mouse cursors, background tile patterns, and toolbar button graphics used throughout X11 desktop environments and applications. Because Unix systems of the 1980s had limited graphical editing tools and X11 applications were written primarily in C, the decision to store bitmaps as C source code was both practical and elegant: developers could create and modify icons using any text editor, and the bitmaps would be compiled directly into the application without requiring separate file I/O routines or image parsing libraries. The format became deeply embedded in the X11 ecosystem, with tools like bitmap(1) providing a simple GUI editor for creating and modifying XBM files, and xsetroot using XBM patterns for desktop backgrounds. Major X11 toolkits including Xt (X Toolkit Intrinsics), Motif, and later Gtk+ and Qt all provided native XBM loading support. When the XPM (X PixMap) format was introduced in 1989 by Groupe Bull, it extended the XBM concept to support color images using a similar C source code representation, but XBM remained the standard for monochrome bitmaps. The format continued to be used throughout the 1990s and 2000s in X11 window managers, desktop environments like CDE (Common Desktop Environment), and embedded Linux systems. Today, XBM files are still encountered in legacy X11 applications, retro computing projects, embedded systems with monochrome displays, and educational contexts where the human-readable format serves as an excellent introduction to bitmap image representation.

Key Features and Uses

XBM files use a distinctive text-based structure that is valid C source code. A typical XBM file begins with two #define lines specifying the image width and height in pixels, optionally followed by #define lines for a hotspot position (x_hot and y_hot) when the bitmap is used as a cursor. The pixel data is stored in a static array of unsigned char values written in hexadecimal notation (e.g., 0xff, 0x00), where each byte contains 8 pixels with the least significant bit (LSB) representing the leftmost pixel in that group. Rows are padded to byte boundaries, so a 12-pixel-wide image uses 2 bytes per row with the upper 4 bits of the second byte unused. The foreground color (bit value 1) and background color (bit value 0) are determined by the application at display time, not stored in the file, which means the same XBM bitmap can be rendered in any two-color combination. This 1-bit-per-pixel encoding produces extremely compact data for small icons: a typical 16x16 cursor requires only 32 bytes of pixel data. The C source code format also makes XBM files trivially diffable in version control systems, as changes to individual pixels appear as modified hexadecimal values in specific array positions. XBM files can be read and written by Pillow (Python), ImageMagick, GIMP, XnView, and the X11 bitmap editor, and are natively supported by all X Window System implementations including X.Org and XFree86.

Common Applications

XBM files have historically been used for X Window System icons, mouse cursors, bitmap patterns, and user interface elements in Unix and Linux graphical applications. In X11 window managers such as twm, fvwm, Openbox, and IceWM, XBM bitmaps define window titlebar buttons (close, minimize, maximize), menu icons, and window decoration patterns. The xsetroot utility uses XBM files to set desktop background tile patterns, and the xterm terminal emulator supports custom XBM icons. Mouse cursors in X11 are traditionally defined using pairs of XBM files: one for the cursor shape and one for the cursor mask, which together specify which pixels are visible and their foreground/background colors. In embedded systems and microcontroller projects, XBM format is popular for storing monochrome graphics for OLED and LCD displays because the C array format can be directly included in firmware source code without any image decoding library, making it ideal for resource-constrained devices like Arduino, ESP32, and Raspberry Pi Pico projects. The format is also used in retro computing and pixel art communities, where the 1-bit limitation is embraced as an artistic constraint. Converting XBM files to modern formats like PNG or BMP is common when migrating legacy X11 applications to modern toolkits, extracting icons from vintage Unix software, or preparing monochrome bitmap assets for web display. Converting images to XBM format is useful when creating custom X11 cursors and icons, preparing monochrome graphics for embedded displays, or generating C-includable bitmap data for firmware development.

Advantages and Disadvantages

Advantages

  • Directly Compilable: Can be #included in C/C++ programs and compiled as part of the application binary
  • Human-Readable: Stored as plain text C source code, editable in any text editor
  • No Parsing Library Required: C compiler handles the data directly, no external image loading code needed
  • Version Control Friendly: Text-based format produces meaningful diffs in version control systems
  • Minimal Resource Overhead: Extremely compact for small icons and cursors at 1 bit per pixel
  • Universal X11 Support: Natively supported by all X Window System implementations and toolkits
  • Lossless Quality: Exact bit-for-bit reproduction of monochrome pixel data
  • Hotspot Support: Can define cursor hotspot coordinates for mouse cursor use
  • Embedded Systems Ready: Perfect for microcontroller firmware with monochrome OLED/LCD displays
  • Simple Specification: Trivial to implement readers and writers in any programming language

Disadvantages

  • Monochrome Only: Limited to 1-bit color depth (two colors), no grayscale or color support
  • Large File Sizes: Text encoding is much larger than binary representation for the same pixel data
  • Not Suitable for Photos: Cannot represent photographs, gradients, or complex graphics
  • Limited Ecosystem: Primarily confined to X Window System and embedded development
  • Superseded by Modern Formats: Replaced by XPM for color, and by PNG/SVG for modern applications
  • No Compression: Does not support any form of data compression
  • No Metadata Standards: Does not support EXIF, IPTC, XMP, or other metadata frameworks
  • No Animation: Cannot store animated image sequences in a single file
  • No Alpha Channel: Does not support transparency beyond the cursor mask mechanism
  • Not Web-Compatible: Cannot be displayed natively in web browsers