Image MIME Reference
PBM
Portable Bitmap
image/x-portable-bitmap
VS
Windows Metafile
image/x-wmf
WMF
A complete technical comparison of Portable Bitmap and Windows Metafile — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
Equal browser support
Feature Support
| Feature | PBM | WMF |
|---|---|---|
| Transparency (Alpha) | ✕ No | Yes |
| Animation Support | ✕ No | ✕ No |
| Progressive Loading | ✕ No | ✕ No |
| HDR Support | ✕ No | ✕ No |
| EXIF Metadata | ✕ No | ✕ No |
| ICC Color Profile | ✕ No | ✕ No |
Portable Bitmap
image/x-portable-bitmap
Extension
.pbm
Container
Netpbm
Compression
Uncompressed
Algorithm
None
Color Depth
1-bit (Monochrome)
Developed by
Jef Poskanzer (Netpbm Project)
Released
1988
Magic Bytes
50 31 (ASCII) or 50 34 (Binary)
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)
Browser Support Comparison
| Browser | PBM | WMF |
|---|---|---|
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ |
✓
|
PBM
PBM Strengths
- Absolute structural simplicity allows parsers to be written from scratch with just a few lines of code
- ASCII encoding allows manual editing and debugging directly within a standard text editor
- Serves as a flawless, lossless intermediary for 1-bit raster data like scanned documents or barcodes
Limitations
- Strictly limited to 1-bit monochrome images; cannot natively display shades of gray or color
- Lack of compression results in extremely large file sizes, particularly when using the ASCII 'P1' encoding
- No support for alpha transparency or modern metadata standards like EXIF
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
PBM
Use PBM when…
- Optical Character Recognition (OCR) Pre-processing
- Unix/Linux Command-Line Image Pipelines
- Academic Image Processing Teaching
WMF
Use WMF when…
- Legacy Microsoft Office Clip Art and Icons
- Windows GDI Graphics Export
- Early Windows Desktop Publishing