Image MIME Reference
ICO
Windows Icon (Legacy MIME)
image/x-icon
VS
X Pixmap
image/x-xpixmap
XPM
A complete technical comparison of Windows Icon (Legacy MIME) and X Pixmap — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
ICO wins on browser support
Feature Support
| Feature | ICO | XPM |
|---|---|---|
| Transparency (Alpha) | Yes | Yes |
| Animation Support | ✕ No | ✕ No |
| Progressive Loading | ✕ No | ✕ No |
| HDR Support | ✕ No | ✕ No |
| EXIF Metadata | ✕ No | ✕ No |
| ICC Color Profile | ✕ No | ✕ No |
Windows Icon (Legacy MIME)
image/x-icon
Extension
.ico
Container
ICO Directory Structure
Compression
Uncompressed (DIB/BMP) / Deflate (Embedded PNG)
Algorithm
NoneDeflate (via PNG)
Color Depth
1-bit, 4-bit, 8-bit, 24-bit (True Color), 32-bit (RGBA)
Developed by
Microsoft Corporation
Released
1985
Magic Bytes
00 00 01 00
X Pixmap
image/x-xpixmap
Extension
.xpm
Container
C Source Code Header (.c / .h)
Compression
Uncompressed (Source Code)
Algorithm
None
Color Depth
Indexed Color (Custom Palette with RGB and Alpha 'None')
Developed by
Daniel Dardailler and Colas Nahaboo (Bull / X Consortium)
Released
1989
Magic Bytes
2F 2A 20 58 50 4D 20 2A 2F (ASCII '/* XPM */')
Browser Support Comparison
| Browser | ICO | XPM |
|---|---|---|
|
|
✓ 1
|
✕ |
|
|
✓ 1
|
✕ |
|
|
✓ 1
|
✕ |
|
|
✓ 12
|
✕ |
|
|
✓
|
✓
|
ICO
ICO Strengths
- Universally supported by every web browser in existence for website favicons
- Packs multiple resolutions into a single file, eliminating the need to serve different files for the taskbar vs. the desktop
- Modern support for embedded PNGs (since Windows Vista) allows for excellent 32-bit transparency (alpha channels) and drastically reduced file sizes
Limitations
- Internal file structure is convoluted due to decades of legacy cruft, such as the requirement for BMP data to lack a standard file header but double the height property for an archaic XOR/AND mask
- Larger file size compared to a single optimized PNG or SVG, as it literally stores the same image multiple times at different scales
- The MIME type landscape is highly fragmented (x-icon vs. vnd.microsoft.icon), causing occasional caching or strict-MIME validation errors on restrictive servers
XPM
XPM Strengths
- Can be compiled directly into C or C++ source code without requiring an external asset loading mechanism
- Human-readable palette mapping allows developers to inspect, modify, or hand-craft icons directly within a text editor
- Native support for color palettes and transparency via the 'None' keyword
Limitations
- Extremely inefficient storage structure for large images, resulting in massive file bloat compared to binary formats like PNG
- Completely obsolete and unsupported in modern web browsers
- Parsing overhead requires compiling or interpreting text-based color tables at runtime
When to choose which format
ICO
Use ICO when…
- Website Favicons (favicon.ico)
- Windows Application Executable Icons (.exe)
- Desktop Shortcut Icons
XPM
Use XPM when…
- X Window System (X11) Application Icons and Cursors
- Embedded C/C++ Firmware Color UI Assets
- Early Linux Desktop Environment Themes