What is the best format?
There is no such thing as "best," except 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." No format has been designed that meets every need, so "best" ends up as a tradeoff between what users really want and which factors they are willing to sacrifice. In an ideal worlds, advanced users would want a format to:
- save colors accurately, whether cameras or scanners
- reproduce colors accurately in various mediums such as electronic displays and printed pages
- save details accurately without degradation from repeated opening and saving
- use little file space
- have the ability to save multiple layers or pages
- display transparency as well as solid colors
- encode quickly
- decode quickly
- render quickly on web browsers
- 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, but everyone sacrifices some features. My needs as a cataloger are extremely pedestrian.
- I need images to be viewed on computer screens, tablets, and smartphones.
- I need support by a wide array of browsers.
- I need fast rendering on browsers.
- I need small file sizes. (I have over 200,000 images on my local computer.)
- I do NOT care about degradation from repeated saving because I only open and save one time.
- I do NOT need extreme color accuracy. (All images have been degraded to various degrees before reaching me.)
Therefore, to meet my needs as a cataloger, I save images of certificates in the JPG format at a 75% quality level. I don't care one bit that JPGs are "lossy." And I certainly don't need ultra high resolution.
Here is a comparison of a fraction of important features of different formats.
file size 1
|TIF w/ LZW 7
1 based on personal tests where "1" is a JPG file of the lowest scanned quality using an HP Color Laser Jet Pro scanner and Vuescan; other scanners, other software, and different images will produce similar but not identical ratios
2 "M" = million
3 the "stated" capability of the format is 16.8M, but the "real" capability is about 4M colors for 90%-100% JPGs and 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 (as of 2022) only by Safari; check "Can I Use?" for current status
7 TIFs commonly are saved with LZW compression
8 an uncompressed format that can be compressed substantially by ZIP routines
9 not compatible with older browsers
JPGs, PNGs, and GIFs are widely used on the web, especially for icons and images that require transparencies. . Photography professionals are fairly unified in their support of the storage-intensive TIF (TIFF) format. The JP2 (JPEG 2000) format is an excellent format and commonly used for saving CT and MRI scans, but has never gained wide acceptance because of its greater decoding complexity and computational requirements.
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.
Newer formats on the horizon?
WebP and AVIF formats are quickly gaining support for transmitting images across the web. They are not compatible with older browsers, so it will take some time gain to widespread acceptance. There is already more web support for these formats than there is for JPEG2000, which never cuaght on even though superior to older JPEGs. Although the new browsers (Chrome, Edge, Firefox, Opera, and Safari) are using those formats (or soon will), developers currently need to fall back to JPG and PNG formats for delivering images to older browsers like Internet Explorer and so forth. The upside is that they are small files, move across the web quickly, and can decode quickly. If performance is a must, this is probably where development will take place. Currently, we will need to see how how collectors and people like myself respond. Do we stick with what we have, or do we convert en masse?
Let's face it. No format is going to last forever, so at some point we'll all need to change. I'm just not sure when that time will come.