File formats

What is the best format?

The best format is the one that meets users' most important priorities. 

I don't know whether anyone has ever come to blows over image file formats, but arguments abound. Whether implicitly or explicitly, the arguments always involve the word "best." Accurate definition of that word, however, really depends on the factors users are willing to sacrifice because no format can fully accomodate every desire. Ideally every user would like a format to:

  • save colors accurately out or cameras or scanners
  • reproduce colors accurately in various mediums such as electronic displays, video and printed pages
  • save colors accurately with repeated opening and saving
  • use little file space
  • render quickly on browsers
  • contain multiple layers or pages
  • display transparency as well as solid c
  • encode quickly
  • decode quickly
  • attract wide support among web browsers
  • find widespread acceptance among programmers

There is currently no universally-accepted "best." Every format has die-hard support in certain fields and applications.

My needs as a cataloger are quite pedestrian.

  1. I need images to be viewed on computer screens, tablets and smartphones.
  2. I need support by a wide array of browsers.
  3. I need fast rendering on browsers.
  4. I need small file sizes. (I have over 40,000 images of certificates on this website and 156,000 on my local computer.)
  5. I do NOT care about degradation from repeated saving because I only open and save twice, one of which involves down-sizing.
  6. I do NOT need extreme color accuracy. (All images have been degraded to various degrees before reaching me.)

Therefore, I save images of certificates in the JPG format at a 75% quality level.

Here is a comparison of some of the most important features of different formats.

Format Relative
file size 1
Colors
saved 2
Save
quality
Browser
support
JPG 1-11 16.8M 3 Lossy wide
JP2 2-24 16.8M 4 Both minimal 6
GIF 12 256 5 Lossless wide
PNG 33 16.8M Lossless wide
TIF 41 16.8M Lossless none
BMP 7 52 16.8M Lossless wide

NOTES
1 based on personal tests where "1" = the size of an image saved at JPG quality 10 (of 100); other scanners and other software will produce slightly different ratios
2 "M" = million
3 the stated capability of the format is 16.8M, but the "real" capability is about 4M for 90%-100% JPGs and even less below those levels (see The Hacker Factor for explanation)
4 the stated capability, but I do not know actual numbers
5 can save any of 16.8M colors, but only 256 at a time
6 supported (Feb, 2022) only by Safari; check "Can I Use?" for current status
7 an uncompressed format that can be compressed substantially by ZIP routines

All formats experience wide use except on the web. Photography professionals are fairly unified in their support of the storage-intensive TIF (TIFF) format. The JP2 (JPEG 2000) format is commonly used for saving CT and MRI scans but has never gained wide acceptance since its general release in 2000. The GIF and PNG formats are seen constantly as computer icons and images that need transparencies.

Where to learn more

Search the web and you can learn more than you ever wanted to know about image formats and their various sub-varieties. Be warned that once you start down one of those rabbit holes, you may not come up for days.