Image MIME Reference
PJPEG
Progressive JPEG (Legacy IE Alias)
image/pjpeg
VS
X Pixmap
image/x-xpixmap
XPM
A complete technical comparison of Progressive JPEG (Legacy IE Alias) and X Pixmap — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
PJPEG wins on browser support
Feature Support
| Feature | PJPEG | XPM |
|---|---|---|
| Transparency (Alpha) | ✕ No | Yes |
| Animation Support | ✕ No | ✕ No |
| Progressive Loading | Yes | ✕ No |
| HDR Support | ✕ No | ✕ No |
| EXIF Metadata | Yes | ✕ No |
| ICC Color Profile | Yes | ✕ No |
Progressive JPEG (Legacy IE Alias)
image/pjpeg
Extension
.jpeg.jpg.pjpeg.pjp.jfif
Container
JPEG (ISO/IEC 10918-1)
Compression
Lossy (DCT)
Algorithm
Discrete Cosine Transform (DCT)
Color Depth
8-bit, 12-bit
Developed by
Joint Photographic Experts Group / Microsoft (Alias)
Released
1992
Magic Bytes
FF D8 FF E0 (JFIF) / FF D8 FF E1 (Exif)
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 | PJPEG | XPM |
|---|---|---|
|
|
✓ All
|
✕ |
|
|
✓ All
|
✕ |
|
|
✓ All
|
✕ |
|
|
✓ All
|
✕ |
|
|
✓
|
✓
|
PJPEG
PJPEG Strengths
- Progressive JPEGs (which this MIME type attempted to describe) provide excellent perceived loading speeds on slow connections by rendering a low-resolution preview first
- Files sent with this MIME type are fully backwards compatible with any standard JPEG decoder
Limitations
- It is a non-standard MIME type that violates IANA specifications
- Causes strict file upload validation scripts to fail if not explicitly whitelisted or mapped
- Creates unnecessary confusion, as the official image/jpeg MIME type already fully encompasses progressive encoding
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
PJPEG
Use PJPEG when…
- Legacy Internet Explorer File Uploads
- Progressive Image Rendering (Historical context)
XPM
Use XPM when…
- X Window System (X11) Application Icons and Cursors
- Embedded C/C++ Firmware Color UI Assets
- Early Linux Desktop Environment Themes