Free webp to jpg
Image MIME Reference
PNG

Portable Network Graphics (Legacy MIME)

image/x-png
VS

X Pixmap

image/x-xpixmap
XPM

A complete technical comparison of Portable Network Graphics (Legacy MIME) and X Pixmap — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.

PNG wins on browser support

Feature Support

Feature PNG XPM
Transparency (Alpha) Yes Yes
Animation Support ✕ No ✕ No
Progressive Loading Yes ✕ No
HDR Support Yes ✕ No
EXIF Metadata Yes ✕ No
ICC Color Profile Yes ✕ No
Portable Network Graphics (Legacy MIME)
image/x-png
Extension
.png
Container PNG Chunk Structure (IHDR, IDAT, IEND)
Compression Deflate (Lossless)
Algorithm
Deflate (LZ77)
Color Depth 1-bit to 16-bit (Grayscale), 8-bit (Indexed Palette), 24-bit (True Color), 32-bit (True Color with Alpha), 48-bit (High Color), 64-bit (High Color with Alpha)
Developed by PNG Development Group
Released 1996
Magic Bytes
89 50 4E 47 0D 0A 1A 0A
Full PNG reference →
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 */')
Full XPM reference →

Browser Support Comparison

Browser PNG XPM
Chrome Chrome
✓ 1
Firefox Firefox
✓ 1
Safari Safari
✓ 1
Edge Edge
✓ 12
IE IE (Legacy)
PNG

PNG Strengths

  • The underlying format provides flawless, lossless compression and perfect 8-bit alpha channel transparency
  • Universally supported by every modern operating system, image editor, and web browser
Limitations
  • The 'image/x-png' string is an obsolete vendor quirk that forces backend developers to write redundant normalization logic in file upload scripts
  • If left unnormalized, strict MIME validators or content security policies on modern systems may incorrectly reject valid PNG files
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

PNG
Use PNG when…
  • Legacy Internet Explorer File Uploads
  • Older ASP/PHP Web Applications
  • Lossless Web Graphics
XPM
Use XPM when…
  • X Window System (X11) Application Icons and Cursors
  • Embedded C/C++ Firmware Color UI Assets
  • Early Linux Desktop Environment Themes
Share this comparison