Free webp to jpg
Image MIME Reference
FITS

Flexible Image Transport System

image/fits
VS

Portable Graymap

image/x-portable-graymap
PGM

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

Equal browser support

Feature Support

Feature FITS PGM
Transparency (Alpha) ✕ No ✕ No
Animation Support ✕ No ✕ No
Progressive Loading ✕ No ✕ No
HDR Support Yes Yes
EXIF Metadata ✕ No ✕ No
ICC Color Profile ✕ No ✕ No
Flexible Image Transport System
image/fits
Extension
.fits.fit.fts
Container FITS
Compression Uncompressed / Tile Compressed (Rice, GZIP)
Algorithm
UncompressedRiceGZIPHcompress
Color Depth 8-bit, 16-bit, 32-bit, 64-bit (Float/Double)
Developed by IAU FITS Working Group / NASA
Released 1981
Magic Bytes
53 49 4D 50 4C 45 20 20 3D 20
Full FITS 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 FITS PGM
Chrome Chrome
Firefox Firefox
Safari Safari
Edge Edge
IE IE (Legacy)
FITS

FITS Strengths

  • The undisputed global standard for archiving and sharing astronomical data
  • Self-documenting: Headers are written in plain ASCII, ensuring data is readable decades later regardless of software
  • Supports incredibly high dynamic range, N-dimensional arrays, and complex binary tables
Limitations
  • No support in standard consumer software or web browsers
  • Uncompressed raw FITS files from modern telescopes can be excessively large
  • Does not use standard metadata models like EXIF or XMP, requiring specialized parsers
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

FITS
Use FITS when…
  • Astronomy & Astrophysics
  • Space Telescope Data (Hubble, JWST)
  • Scientific Data Archiving
  • Spectroscopy
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