TransWikia.com

Why do modern DSLRs support JPEG but not lossless formats other than RAW?

Photography Asked by Raheel Khan on July 16, 2021

I’m from a programming background and very new to photography. While working with the SDK for the Canon Rebel T3i, I realized that the only image formats natively supported by the camera are RAW (CR2) or JPEG.

I understand the JPEG standard to be lossy and although higher quality parameters can produce very good results, they cannot be compared to say a Bitmap of PNG at a binary level.

The CR2 is Canon’s proprietary format but contains only the sensor data without any processing that is part of the produced JPEG file.

The question is, why would modern DSLRs use JPEG as the only non-RAW format? Wouldn’t it be useful to have a 24-bit RGB format (taking advantae of the camera’s automatic processing modes)?

5 Answers

Some do — for example, most or all Pentax models and higher-end Nikons support TIFF (which, as Raheel Khan notes in a comment above, is better for metadata than PNG). So, there you go. If this is important to you, you can choose a camera which has it. However, it seems that it's not important enough to most consumers to make it something people decide on — I believe that older Canon models supported TIFF output too, but Canon's dropped it. So, as with so many "why don't cameras do this?" questions, the answer comes down to lack of consumer interest.

And that lack of interest isn't hard to explain. With low compression ratios (that is, highest quality settings), JPEG artifacts are hard to find, and as we see in our raw vs. jpeg questions, the real advantage is in flexibility, not losslessness. Non-compressed "baked-in" formats offer basically the same disadvantages and advantages as JPEG, require much more storage space, making them a non-compelling feature.

If you really want to replicate the camera's automatically processing modes, usually the RAW converter offered with the camera does a decent job of offering similar tone curves and close-to-the-same processing, so if that's important to you, you can use that software and export to a lossless format.

Answered by mattdm on July 16, 2021

The JPEG format is very good for final output, filesizes are small and with the highest quality settings artifacts are pretty much invisible.

It's only if you start editing a JPEG that you will see artifacts and the limited dynamic range. So it's a bad format if you plan to later edit images.

If you plan to later edit images than RAW is far better than even a lossless processed file. So in short there is no market for a lossless version of the in camera JPEG, if you want to further process use RAW, if not use JPEG.

Answered by Matt Grum on July 16, 2021

Wouldn't it be useful to have a 24-bit RGB format (taking advantae of the camera's automatic processing modes)?

Not really. Raw files are actually very space efficient, since they only store one greyscale channel, in 12 or 14 bit per pixel. A lossless 24bit format will inevitably create larger files, while dropping 4 or 6 bits of dynamic range. A 48bit format would even be twice as large, of course.

Meanwhile, the camera's processing can be reproduced on the computer using the manufacturer's proprietary software from the raw file, so in the fringe cases where a photographer would on the one hand desire absolute losslessness, but on the other hand would be satisfied with the default processing, that option exists.

Otherwise, the in camera JPEG with max. quality is "good enough" for most use cases that there's just no market for implementing another format.

(But i'd very much support that manufacturers stop using their proprietary raw formats, i just don't see any reason for those.)

Answered by ths on July 16, 2021

File size is one good reason. My 5DII spits out raw files at around 24MB each and when converted to 16Bit TIFFs they weigh in at around 126MB, uncompressed. With compression they can still hit around 70MB which isn't as memory card friendly as the initial 24MB.

Your question mentions .PNG files - the uncompressed 16Bit .PNG equivalent is still 115MB so again this is an inefficient use of flash storage.

@Raheel, thanks for suggesting posting this as an answer :-)

Answered by Darkhausen on July 16, 2021

There is no such thing as a "lossless" RGB format representing a color photograph. The only lossless information that is available is the sensor output. Once you start processing, information gets lost that might be retained using different processing methods.

In contrast to a "lossless" RGB format, the camera output is not RGB (but rather patterned with the Bayer color mask that still requires demosaicing for which there are various algorithms with various performance specifics for various applications), it is not rectilinear (but rather distorted with geometric distortion that tends to get straightened out in the course of processing), it is noisy (for which there are various parametric denoising methods depending on the expected noise levels for various camera characteristics), its color representation requires white balance correction (which may warrant different choices depending on what you want to appear as subject) and so on.

With early cameras offering TIFF formats (TIFF actually is only a container format, and indeed several raw formats also use files structured as TIFF while called differently), the output (also the JPEG output) was not as thoroughly processed as with modern cameras and the TIFF file was a closer representation to the sensor data than it is these days.

As it stands, offering a "lossless RGB" format rather than JPEG would be a smokescreen: one of JPEG's effective lossy compression strategy is chroma subsampling, but the Bayer sensor already causes chroma subsampling anyway so the "non-lossy" RGB representation showcases data that has to a good degree been lost anyway.

Answered by user98068 on July 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP