XBM Format Guide
Available Conversions
Convert XBM monochrome bitmaps to AVIF for modern web delivery with maximum compression
Convert XBM bitmaps to BLP for Blizzard game engine texture pipelines
Convert XBM to BMP format for Windows compatibility and uncompressed storage
Convert XBM bitmaps to DDS for GPU-compressed game engine textures
Convert XBM to EPS for professional print and prepress workflows
Convert XBM to GIF format for web graphics and legacy compatibility
Convert XBM bitmaps to ICNS for macOS application icons
Convert XBM to ICO for Windows icons and website favicons
Convert XBM to JPEG 2000 for professional and scientific applications
Convert XBM to JPG for universal compatibility and easy sharing
Convert XBM bitmaps to ZSoft Paintbrush format for legacy applications
Convert XBM to PNG for lossless raster quality with transparency support
Convert XBM bitmaps to Portable Pixmap format for image processing
Convert XBM bitmaps to QOI for fast lossless compression
Convert XBM bitmaps to SGI for VFX compositing and rendering pipelines
Convert XBM to TGA for game development and 3D rendering pipelines
Convert XBM to TIFF for professional editing and archival purposes
Convert XBM to WebP for optimized web image delivery
Convert to XBM
Convert Sony RAW photos to XBM monochrome bitmaps for X11 applications
Convert AVIF images to XBM for X Window System icon and cursor creation
Convert Casio RAW photos to XBM monochrome bitmaps for embedded systems
Convert Blizzard game textures to XBM for X11 bitmap integration
Convert BMP images to XBM for X Window System icons and cursors
Convert Phase One P-series RAW photos to XBM monochrome bitmaps
Convert Canon RAW photos to XBM for X11 icon and cursor creation
Convert Canon mirrorless RAW photos to XBM monochrome bitmaps
Convert Canon PowerShot RAW photos to XBM for X11 applications
Convert Windows Cursor to X BitMap format
Convert Kodak Professional RAW photos to XBM monochrome bitmaps
Convert Multi-page PCX to X BitMap format
Convert DirectDraw Surface textures to XBM for X Window System use
Convert Adobe DNG RAW files to XBM monochrome bitmaps for X11
Convert EPS print artwork to XBM for X Window System icon creation
Convert Epson RAW photos to XBM monochrome bitmaps for embedded systems
Convert Hasselblad/Imacon RAW photos to XBM for X11 applications
Convert GIF images to XBM monochrome bitmaps for X Window System
Convert GoPro action camera RAW photos to XBM monochrome bitmaps
Convert Apple HEIC photos to XBM for X11 icon and cursor creation
Convert ICO icons to XBM for X Window System bitmap integration
Convert ICNS macOS icons to XBM for X11 icon migration
Convert Phase One RAW photos to XBM monochrome bitmaps for X11
Convert JPEG 2000 images to XBM for X Window System applications
Convert JPEG photos to XBM monochrome bitmaps for X11 icons and cursors
Convert Kodak RAW photos to XBM for X Window System bitmap use
Convert Mamiya RAW photos to XBM monochrome bitmaps for embedded systems
Convert Leaf RAW photos to XBM for X11 icon and cursor creation
Convert Minolta RAW photos to XBM monochrome bitmaps for X11
Convert Nikon RAW photos to XBM for X Window System applications
Convert Nikon compact RAW photos to XBM monochrome bitmaps
Convert Olympus RAW photos to XBM for X11 bitmap integration
Convert ZSoft Paintbrush images to XBM for X Window System use
Convert Pentax RAW photos to XBM monochrome bitmaps for X11
Convert PNG images to XBM for X Window System icons and cursors
Convert Portable Pixmap images to XBM monochrome bitmaps for X11
Convert PSD Photoshop files to XBM for X Window System icon creation
Convert Pentax Optio RAW photos to XBM monochrome bitmaps
Convert QOI lossless images to XBM for X11 bitmap integration
Convert Fujifilm RAW photos to XBM monochrome bitmaps for X11
Convert Panasonic RAW photos to XBM for X Window System applications
Convert Leica RAW photos to XBM monochrome bitmaps for X11
Convert Sony RAW 2 photos to XBM for X Window System bitmap use
Convert Samsung RAW photos to XBM monochrome bitmaps for X11
Convert SVG vector graphics to XBM for X11 icon and cursor creation
Convert TGA textures to XBM monochrome bitmaps for X Window System
Convert Hasselblad RAW photos to XBM for X11 bitmap integration
Convert TIFF images to XBM monochrome bitmaps for X Window System
Convert WebP images to XBM for X11 icon and cursor creation
Convert Sigma/Foveon RAW photos to XBM monochrome bitmaps for X11
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