Free webp to jpg
Image MIME Reference
PGM

Portable Graymap

image/x-portable-graymap
VS

Windows Metafile

image/x-wmf
WMF

A complete technical comparison of Portable Graymap and Windows Metafile — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.

Equal browser support

Feature Support

Feature PGM WMF
Transparency (Alpha) ✕ No Yes
Animation Support ✕ No ✕ No
Progressive Loading ✕ No ✕ No
HDR Support Yes ✕ No
EXIF Metadata ✕ No ✕ No
ICC Color Profile ✕ No ✕ No
Portable Graymap
image/x-portable-graymap
Extension
.pgm
Container Netpbm
Compression Uncompressed
Algorithm
None
Color Depth 8-bit (Grayscale), 16-bit (Grayscale)
Developed by Jef Poskanzer (Netpbm Project)
Released 1988
Magic Bytes
50 32 (ASCII) or 50 35 (Binary)
Full PGM reference →
Windows Metafile
image/x-wmf
Extension
.wmf.emf
Container Windows GDI Metafile Command Stream
Compression Uncompressed (Command Stream)
Algorithm
None
Color Depth Varies based on GDI rendering engine
Developed by Microsoft Corporation
Released 1990
Magic Bytes
D7 CD C6 9A (Aldus Placeable Metafile Header) or 01 00 09 00 (Standard WMF Header)
Full WMF reference →

Browser Support Comparison

Browser PGM WMF
Chrome Chrome
Firefox Firefox
Safari Safari
Edge Edge
IE IE (Legacy)
PGM

PGM Strengths

  • Extremely simple format allows custom parsers to be written from scratch in minimal time
  • Supports 16-bit precision, making it highly valuable for scientific, medical, and height-map data where 8-bit precision is insufficient
  • ASCII encoding ('P2') allows manual editing and visual inspection of pixel values directly within a text editor
Limitations
  • Strictly limited to grayscale; cannot display color
  • Lack of compression results in massive file sizes, making it entirely impractical for web delivery or consumer storage
  • Does not support alpha transparency or modern metadata structures
WMF

WMF Strengths

  • Infinitely scalable vector format that remains remarkably compact for simple geometric illustrations and charts
  • Historically served as a seamless conduit for copying and pasting vector graphics between disparate Windows applications via the system clipboard
Limitations
  • Notoriously plagued by historic security vulnerabilities, making raw WMF parsing a vector for exploits in legacy software
  • Completely obsolete and unsupported in modern web environments (browsers cannot render them)
  • Strictly tied to the Windows GDI architecture, making cross-platform rendering inconsistent across Linux and macOS

When to choose which format

PGM
Use PGM when…
  • Computer Vision and Machine Learning Pre-processing
  • Scientific and Medical Image Processing
  • Unix/Linux Command-Line Image Pipelines
WMF
Use WMF when…
  • Legacy Microsoft Office Clip Art and Icons
  • Windows GDI Graphics Export
  • Early Windows Desktop Publishing
Share this comparison