1
\$\begingroup\$

There's plenty of "raw vs jpeg" stuff out there, but no one ever seems to talk about other formats like TIFF (16 bit, uncompressed or lossless compression).

When color grading or doing brightness/exposure correction, raw is far superior to jpeg... but isn't the advantage of raw over jpeg simply the fact that a raw image has a higher bit depth and is not lossy compressed?

Given the same image, is there really any difference between working with a 14-bit raw file and a 16 bit uncompressed TIFF (other than size on disk)?

It just seems like a lot of the advantage of raw isn't the raw format, but the bit depth of the format and non-lossy compression, which other non-raw formats offer.

Is this assumption correct? Other than demosaicing, what things can no longer be changed by editing a 16 bit TIFF that could still be changed (without similar quality loss) by editing the raw file for the same image?

What other non-raw formats have the same functionalities as raw?

\$\endgroup\$
4
  • \$\begingroup\$ Being a bit cheeky here, but my old Phase Ones all capture to tif. Theres more to it, but its actually a raw file with a tif compatible structure that supplies a preview. \$\endgroup\$ Commented Nov 21, 2023 at 7:33
  • \$\begingroup\$ Also a bit nit-picky, but technically, file formats do not have functionalities or capabilities. The real question is exactly what data is stored in the file, and whether there exists software to take advantage of the existing data. If the data stored in the file is anything other than the raw sensor data (and metadata, etc), then by definition some possibilities of manipulating the raw data are already lost. \$\endgroup\$
    – twalberg
    Commented Nov 21, 2023 at 15:35
  • \$\begingroup\$ Some pano software like Hugin won't output raw, so part of what promoted this question is, "where in the workflow do you do color grading when dealing with panoramic images". If you lose the full ability to color grade or tone correct an image once you leave raw, then you would need to grade the component images before passing them into the pano stitcher. This gets further complicated by the possibility of working with HDR (bracketed) sets that also need stitched. \$\endgroup\$
    – Nick
    Commented Nov 21, 2023 at 21:23
  • \$\begingroup\$ "but isn't the advantage of raw over jpeg simply the fact that a raw image has a higher bit depth and is not lossy compressed?" No. Bits don't always represent the same thing. In raw image files bits represent monochrome luminance values. In classic "TIFFs" bit represent a color channel value for the Red, Blue, or Green channel. \$\endgroup\$
    – Michael C
    Commented Nov 22, 2023 at 3:34

4 Answers 4

3
\$\begingroup\$

Doing some digging on the Interwebs, it all comes down to purpose and what each one is.

A RAW file is a record of sensor data, all of it.

A TIFF file is a processed image that no longer contains all the RAW data.

Bit depth reflects the tonal range a pixel can reproduce.

Let's say you took a photo of a fairly contrasty, somewhat overexposed scene in RAW, did some post processing, and exported a TIFF that looked pretty good. The photo editor sees the photo, but knows the most important part was in one of the shadow areas. You can't edit the TIFF because you chose a specific tonal range for those shadows, leaving image data behind in the RAW file. Trying to brighten up the shadows in the TIFF yields not much usable at all because a lot of image data was left behind when you decided on the final tonal range in that shadow area when exporting to TIFF.

The RAW file is a different story. The RAW file still has all the image information for that shadow area. It's really quite amazing what kind of quality can be pulled from a RAW file.

Another way to think about this is printing a film negative. If you make a print and burn in an area that actually looks okay in the negative, the final print won't have the detail in the shadow area that the negative has. You wouldn't take a photo of the print and try to recover the shadow area. That information is no longer in the print. You would re-print the negative because it has more tonal range than you chose to put into the final print.

It is important to understand that a RAW file cannot be used for display or production. Most camera manufacturers have their own proprietary RAW format. And RAW files don't look that good unprocessed. They have to be processed and saved into a display format of some kind, and the final format is chosen based on what the final need is i.e. print, video still, web, publishing in a book, or newspaper (they're still around).

There is a difference between compression and processing. All file types that are not RAW imply processing. All files that are not RAW are processed, meaning that it was made to look good for some final medium. During processing, tonal ranges for dark and light areas of the photo were chosen and the data from the RAW file was used to optimize the look of each area using some of the sensor data that best represented the desired look, leaving data to make the area lighter or darker out of the final image as it is no longer needed. The final export of the edited RAW file is either compressed or not compressed depending on the final format chosen for the image.

\$\endgroup\$
1
\$\begingroup\$

"Other than demosaicing..."

That seems to be a massive understatement... demosaicing is a huge factor.

First, a file format is just a container... in itself it doesn't mean anything. E.g. there are dng's which are (essentially) raw files, and there are dng's which are not.

But a raw file is not an image per-se. It is just the brightness values for the photosites and a bunch of instructions on how to convert that data into an image. Once that data is converted into an image in a lossy medium (non-raw), it can never be entirely undone.

Even a raw-dng conversion sets the black point for the image; which means the data for photosites which are determined to be "black" is truncated/discarded. And dng conversions do not include masked pixel data that the original raw file might have, and some raw converters can use.

\$\endgroup\$
1
\$\begingroup\$

But isn't the advantage of raw over jpeg simply the fact that a raw image has a higher bit depth and is not lossy compressed?

No. Bits don't always represent the same thing. In raw image files bits represent monochrome luminance values. In classic 16-bit RGB TIFFs the bits represent a color channel value for the Red, Blue, or Green channel in 65,536 very small steps. In an 8-bit JPEGs the bits represent color channel values in RGB in only 256 much coarser steps. But in both cases the raw image information has already been demosaiced/de-Bayered and probably had curves (which simulate the logarithmic human response to light of increasing intensity) applied to convert the gray scale raw information into three discrete values for each of the three color channels.

Other than demosaicing...

Since it's irreversible, demosaicing is a pretty big deal.

Even though digital imaging sensors typically have a color filter array (CFA) in front of them, the colors used on the filter arrays do not correspond to the same colors emitted by our RGB display devices. Nor are they the same colors as those used in CMYK printing. And contrary to all of the descriptions all over the internet, the "red" filters do not block "all" green and blue light, nor does the "green" filter block "all" red and blue light, nor does the "blue" filter block "all" green and red light. Some of each gets through all of them, just as some of each are registered by our short, medium, and long wavelength retinal cones.

It's this overlapping response to different wavelengths that gives our brain the ability to create the perception of color out of the information our retinal cones collect. Color is a product of perception. There is no intrinsic color for any wavelength of electromagnetic radiation. Dogs can't see some of the wavelengths we can. Many insects can see wavelengths we can't. What "color" are the wavelengths bees can see that we can't?

How much weight is given to the output of the information from the photosites under each CFA color and how much each RGB channel is what determines white balance (which includes but is not limited to color temperature - there's also a green ←→ magenta axis as well).

Once the white balance has been applied to generate the RGB values for each pixel in an image, it is more or less "cooked in". The more bits each color channel uses, the more leeway there is to alter the color before the image starts to fall apart, but even 16-bit TIFFs do not have the flexibility to alter WB that 14-bit raw files do.

... what things can no longer be changed by editing a 16 bit TIFF that could still be changed (without similar quality loss) by editing the raw file for the same image?

Black point and white point determine what is the darkest value below which everything will be rendered "0" or pure black and what is the brightest value above which everything will be rendered at full saturation (i.e. 255 in 8-bits, 65535 in 16-bits). These, too, are cooked in when raw information is converted to a typical 16-bit RGB TIFF image.

\$\endgroup\$
1
\$\begingroup\$

Other than having deeper colour and no loss compression main reason why raw files are superior is that bigger computer with no power restriction and no patent and license restrictions allows better processing algorithms. There are many stages which significantly improve image quality:

  • CFA interpolation
  • sharpening
  • colour profiling
  • white balance adjustment
  • highlight recovery
  • tonal curves
  • optical corrections
  • noise reduction

and any kind of in-camera preprocessing weakens at least one of them. The least invasive non entirely raw file format would be lossy compression which Sony and Nikon use (and maybe some others).

It's very much decided that all the best work is done on PC so camera OEMs do not have a lot of incentive to excel at in-camera output and it's much harder to develop camera software than desktop/laptop computer software. It's an efficient separation of responsibilities.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.