Image MIME Reference
DjVu
DjVu Document
image/vnd.djvu
VS
Portable Bitmap
image/x-portable-bitmap
PBM
A complete technical comparison of DjVu Document and Portable Bitmap — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
Equal browser support
Feature Support
| Feature | DjVu | PBM |
|---|---|---|
| Transparency (Alpha) | Yes | ✕ No |
| Animation Support | ✕ No | ✕ No |
| Progressive Loading | Yes | ✕ No |
| HDR Support | ✕ No | ✕ No |
| EXIF Metadata | ✕ No | ✕ No |
| ICC Color Profile | ✕ No | ✕ No |
DjVu Document
image/vnd.djvu
Extension
.djvu.djv
Container
Interchange File Format (IFF)
Compression
JB2 (Bi-tonal Text) / IW44 (Wavelet Background) / BZZ (General Data/Text)
Algorithm
JB2IW44BZZ
Color Depth
1-bit (Foreground Text), 24-bit (Background)
Developed by
AT&T Labs (Yann LeCun, Léon Bottou, Patrick Haffner, Paul G. Howard)
Released
1996
Magic Bytes
41 54 26 54 46 4F 52 4D
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)
Browser Support Comparison
| Browser | DjVu | PBM |
|---|---|---|
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
|
|
✕ | ✕ |
DjVu
DjVu Strengths
- Unmatched compression ratios for high-resolution scanned documents (often 5 to 10 times smaller than equivalent JPEG/TIFF-based PDFs)
- Separates text layers cleanly from backgrounds, allowing for highly legible text even at low file sizes
- Embedded OCR (Optical Character Recognition) text layers allow for fast searching
Limitations
- Lacks native support in modern operating systems and web browsers, requiring third-party software
- Largely superseded by PDF/A and modern PDF compression standards in standard corporate workflows
- Not suitable for vector graphics or born-digital documents (like Word exports), where standard PDF is far superior
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
When to choose which format
DjVu
Use DjVu when…
- Scanned Books and Manuals
- Digital Libraries (e.g., Internet Archive)
- Historical Document Archiving
PBM
Use PBM when…
- Optical Character Recognition (OCR) Pre-processing
- Unix/Linux Command-Line Image Pipelines
- Academic Image Processing Teaching