Image MIME Reference
DNG
Adobe Digital Negative
image/x-adobe-dng
VS
X Pixmap
image/x-xpixmap
XPM
A complete technical comparison of Adobe Digital Negative and X Pixmap — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
Equal browser support
Feature Support
| Feature | DNG | XPM |
|---|---|---|
| Transparency (Alpha) | Yes | Yes |
| Animation Support | ✕ No | ✕ No |
| Progressive Loading | ✕ No | ✕ No |
| HDR Support | Yes | ✕ No |
| EXIF Metadata | Yes | ✕ No |
| ICC Color Profile | Yes | ✕ No |
Adobe Digital Negative
image/x-adobe-dng
Extension
.dng
Container
TIFF/EP
Compression
Lossless JPEG / Deflate / Lossy JPEG (DNG 1.4+)
Algorithm
Lossless JPEG (Standard)Lossy JPEG (Compression option)Uncompressed
Color Depth
12-bit, 14-bit, 16-bit, 32-bit (Floating Point HDR)
Developed by
Adobe Systems
Released
2004
Magic Bytes
49 49 2A 00 or 4D 4D 00 2A
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 | DNG | XPM |
|---|---|---|
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ |
✓
|
DNG
DNG Strengths
- Openly documented specification guarantees long-term archival accessibility, freeing photographers from proprietary manufacturer lock-in
- Lossless compression algorithms often result in files 15-20% smaller than uncompressed proprietary raw formats
- Natively supported by modern smartphone operating systems (iOS and Android) for high-end mobile photography
Limitations
- Conversion from proprietary raw to DNG takes processing time and can strip specific, proprietary manufacturer metadata (like active D-Lighting or in-camera lens corrections)
- File sizes are massive compared to standard JPEGs or HEIC files
- Cannot be rendered natively in web browsers without server-side processing or WebAssembly decoders
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
DNG
Use DNG when…
- Digital Photography Archival
- Mobile Raw Capture (iOS ProRAW / Android Camera2 API)
- Cross-Platform Raw Editing Workflows
XPM
Use XPM when…
- X Window System (X11) Application Icons and Cursors
- Embedded C/C++ Firmware Color UI Assets
- Early Linux Desktop Environment Themes