0

I've been viewing, editing, and storing digital images since before digital cameras were common -- I've used GIF, JPEG, TIFF, PNG, and a few other now-obsolete formats.

GIF has been mainly relegated to animated images, because nearly any other compressed format produces smaller files (but only GIF has the ability to display multiple frames sequentially, even loop the display, built into the format spec). TIFF is mainly used for images to be stored in documents like PDF or word processor files, and PNG is the "new kid on the block" with exceptionally high efficiency and lossless compression (at least up to some point).

So, PNG is clearly superior to JPEG, both in terms of preserving image quality, and in actual compression level -- yet digital cameras seem to either save only in JPEG or give a choice of some uncompressed RAW format, with or without simultaneous JPEG.

Why haven't cameras adopted the superior PNG compression technology, which would fit more, higher quality images on a memory card and largely (if not completely) eliminate the need for dual-format storage?

Zeiss Ikon
  • 7,141
  • 13
  • 37
  • Phones have gone HEIC, skipping png entirely. Cameras might catch up in the next decade or so ;) – Tetsujin Jul 28 '21 at 18:00
  • 1
    Well, that was educational -- apparently Canon and Sony have already put HEIC in their newer offerings. – Zeiss Ikon Jul 28 '21 at 18:05
  • GIF images are limited to a 256 color palette, which is not acceptable for digital photos. – Pete Jul 28 '21 at 18:09
  • Which is not what I asked, @Pete. PNG is superior to GIF in every way except for animations. – Zeiss Ikon Jul 28 '21 at 18:15
  • 1
    PNG is OK when there are uniform areas, but it cannot compress your random photography. Even an image like this with vast expenses of blue sky is bigger as a PNG (28.1MB) that as the original raw CR2 (20.7MB). In addition the PNG compression algorithm is very CPU intensive (much more than JPEG), so difficult to put in a camera.... The only good contender to JPEG would be WebP, but support isn't universal. – xenoid Jul 28 '21 at 19:38
  • Possibly a duplicate question, but the answers in the linked question are rather outdated since in 2021, PNG can contain EXIF and use 16bit/channel data. – xenoid Jul 28 '21 at 19:46
  • 1
    @xiota https://ftp-osl.osuosl.org/pub/libpng/documents/pngext-1.5.0.html#C.eXIf – xenoid Jul 28 '21 at 21:30
  • 1
    @xiota Yes, and EXIF data and "progressive" JPEG used to be an extension to JPG (many LCD photo frames still don't recognize progressive JPEG, despite it being over 10 years old), and animation and multiple colormap are extensions to the original GIF format. Formats evolve. The 2017 spec includes an eXIF block, so EXIF data is now in the PNG standard. PNG is still a bad choice, but the reasons are not the same. – xenoid Jul 28 '21 at 22:29

1 Answers1

0

Simple answer - offering more options requires more code in the camera firmware, which takes more space, introduces more complexity, and provides more opportunity for bugs. Now, it might make sense (someday) to offer a lossy-compressed option in place of JPG, or even a lossless-compressed option like TIFF or PNG as a third option (in addition to RAW), but I don't think you'll ever see a camera offering the same number of options that something like Photoshop or The Gimp do...

twalberg
  • 5,138
  • 1
  • 12
  • 20
  • Actually, I was thinking a lossless compression like PNG could replace both RAW and JPEG -- debug once, and done (and there are PNG compression algorithms literally everywhere). – Zeiss Ikon Jul 28 '21 at 17:58
  • @ZeissIkon JPEG stands for Joint Photographic Experts Group. It was designed to work end to end across cameras, scanners, displays and printers. The people involved were experts, but if you call them jpgs it is less explicit. There is also JPEG 2000 but almost nothing supports it. – Bob Macaroni McStevens Jul 28 '21 at 20:14
  • @BobMacaroniMcStevens JPGs is often used as shorthand for JPG files. The JPG portion is a reference to the file extension. The other JPEG formats use different file extensions. – xiota Jul 28 '21 at 21:11
  • @xiota Expertise is why cameras encode pictures using JPEG standards in files. JPG is common because of the nnnnnnnn.eee naming limitations of some file systems, in particular MS DOS and compatible file systems like FAT commonly used by early removable media. – Bob Macaroni McStevens Jul 28 '21 at 22:02
  • @BobMacaroniMcStevens "Expertise" is not why cameras encode pictures using ISO 10918. Other "JPEG standards" (like JPEG XR, JPEG 2000) were basically market failures. File extensions have been, and continue to be, used in file systems that did not, and do not, have the naming restrictions you refer to. – xiota Jul 28 '21 at 22:22
  • @xiota I agree. The experts at JPEG did not require a specific file extension for the standard that was adopted by the ISO. Indeed the MIME Type is independent of file extension (and modern operating systems don’t need an extension to identify file content type. However the MIME Type is ‘image/jpeg” per this popular StackOverflow content https://stackoverflow.com/questions/33692835/is-the-mime-type-image-jpg-the-same-as-image-jpeg Fortunately the experts have made it easy for me to not worry my pretty head about it. YMMV. – Bob Macaroni McStevens Jul 28 '21 at 23:07
  • The three letters extension is lowest common denominator or highest compatibility depending on how your cornflakes came out in the morning. But FAT compatibility was a significant concern three decades ago. – Bob Macaroni McStevens Jul 28 '21 at 23:10
  • @BobMacaroniMcStevens My point is that it would be wrong to refer to JPEG 2000 as "jpgs", as you say, because jpg refers to the file extension. No one who knows what they're doing would intentionally put JPEG 2000 image data in a file with a jpg extension. – xiota Jul 29 '21 at 03:10
  • @xiota That comment was not addressed you. It was addressed to the OP. You have taken it out of context and argued against something that it did not say. My comment was about experts and expertise. When I lack it I defer to it with full understanding that it will engender internet outrage. Then again every thing engenders internet outrage doesn’t it. – Bob Macaroni McStevens Jul 30 '21 at 03:57
  • @BobMacaroniMcStevens No one wrote "jpgs" on this page before you did. No one wrote about the committee on this page before you did. OP was clearly asking about JPEG images. You wrote, "but if you call them jpgs it is less explicit. There is also JPEG 2000 but almost nothing supports it." That implies that you think "jpgs" can be used to refer to any image format developed by the JPEG committee (or at least JPEG 2000), which is not the case. Only people who are very confused by image formats would do that, and they would be just as likely to confuse JPG, GIF, TIF, PNG, RAW, etc. – xiota Jul 30 '21 at 05:35
  • @xiota It, as a conditional statement using a second person pronoun, implies no such thing. If you believe otherwise, you would be mistaken. – Bob Macaroni McStevens Jul 30 '21 at 12:29