Image MIME Reference
BMP
Windows Bitmap (Legacy Windows MIME Alias)
image/x-windows-bmp
VS
X Bitmap (Legacy MIME Alias)
image/x-xbm
XBM
A complete technical comparison of Windows Bitmap (Legacy Windows MIME Alias) and X Bitmap (Legacy MIME Alias) — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
BMP wins on browser support
Feature Support
| Feature | BMP | XBM |
|---|---|---|
| Transparency (Alpha) | Yes | Yes |
| Animation Support | ✕ No | ✕ No |
| Progressive Loading | ✕ No | ✕ No |
| HDR Support | ✕ No | ✕ No |
| EXIF Metadata | ✕ No | ✕ No |
| ICC Color Profile | Yes | ✕ No |
Windows Bitmap (Legacy Windows MIME Alias)
image/x-windows-bmp
Extension
.bmp.dib
Container
DIB (Device-Independent Bitmap)
Compression
Uncompressed / Run-Length Encoding (RLE)
Algorithm
NoneRLE4RLE8
Color Depth
1-bit (Monochrome), 4-bit (16 colors), 8-bit (256 colors), 16-bit (High Color), 24-bit (True Color), 32-bit (True Color with Alpha)
Developed by
Microsoft Corporation
Released
1985
Magic Bytes
42 4D
X Bitmap (Legacy MIME Alias)
image/x-xbm
Extension
.xbm
Container
C Source Code Header (.h)
Compression
Uncompressed (Source Code)
Algorithm
None
Color Depth
1-bit (Monochrome)
Developed by
MIT / X Consortium (X Window System)
Released
1988
Magic Bytes
23 64 65 66 69 6e 65 (ASCII '#define')
Browser Support Comparison
| Browser | BMP | XBM |
|---|---|---|
|
|
✓ 1
|
✕ |
|
|
✓ 1
|
✕ |
|
|
✓ 1
|
✕ |
|
|
✓ 12
|
✕ |
|
|
✓
|
✓
|
BMP
BMP Strengths
- Universally supported by all major operating systems and modern web browsers
- Maintains perfect, lossless fidelity because pixel data is stored without lossy compression artifacts
Limitations
- Massive file size overhead due to a lack of modern compression algorithms
- Legacy MIME strings like 'image/x-windows-bmp' can trigger validation warnings in strict security or API environments if unhandled
XBM
XBM Strengths
- Can be compiled directly into C or C++ source code without needing an external file loader or binary asset manager
- Human-readable structure allows developers to inspect, edit, or hand-craft tiny icons directly within a text editor
- Extremely predictable and lightweight for 1-bit hardware displays and embedded systems
Limitations
- Strictly limited to 1-bit monochrome (black and white) graphics with no gray or color support
- Text-based C syntax creates massive file bloat compared to binary 1-bit formats like PBM
- Completely deprecated in modern web browsers and desktop GUI frameworks
When to choose which format
BMP
Use BMP when…
- Legacy Windows Desktop Registry Associations
- Older Enterprise Intranet Applications
- Windows Graphics Archival
XBM
Use XBM when…
- X Window System (X11) Cursors and Icons
- Embedded C/C++ Firmware UI Assets
- Early 1990s Unix Web Graphics