Free webp to jpg
Image MIME Reference
AVIF

AV1 Image File Format

image/avif
VS

Portable Graymap

image/x-portable-graymap
PGM

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

AVIF wins on browser support

Feature Support

Feature AVIF PGM
Transparency (Alpha) Yes ✕ No
Animation Support Yes ✕ No
Progressive Loading ✕ No ✕ No
HDR Support Yes Yes
EXIF Metadata Yes ✕ No
ICC Color Profile Yes ✕ No
AV1 Image File Format
image/avif
Extension
.avif
Container HEIF / ISOBMFF
Compression AV1 Lossy / AV1 Lossless
Algorithm
AV1
Color Depth 8-bit, 10-bit, 12-bit
Developed by Alliance for Open Media (AOMedia)
Released 2019
Magic Bytes
XX XX XX XX 66 74 79 70 61 76 69 66
Full AVIF reference →
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 →

Browser Support Comparison

Browser AVIF PGM
Chrome Chrome
✓ 85+
Firefox Firefox
✓ 93+
Safari Safari
✓ 16+
Edge Edge
✓ 121+
IE IE (Legacy)
AVIF

AVIF Strengths

  • Best-in-class compression — typically 20–50% smaller than WebP at equivalent quality
  • Native HDR and wide color gamut (BT.2020) support
  • Supports 8, 10, and 12-bit color depth
Limitations
  • Encoding is highly CPU-intensive — significantly slower than JPEG or WebP
  • Requires Edge 121+ (not supported in earlier Edge versions)
  • Limited support in native desktop image viewers
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

When to choose which format

AVIF
Use AVIF when…
  • Next-Gen Websites
  • HDR Photography
  • High-Quality Web Images
PGM
Use PGM when…
  • Computer Vision and Machine Learning Pre-processing
  • Scientific and Medical Image Processing
  • Unix/Linux Command-Line Image Pipelines
Share this comparison