What artifacts can Nikon's lossy NEF compression cause?

Asked 3/20/2011

4 views

2 answers

0

Some Nikon cameras offer both "Compressed" and "Lossless compressed" NEF options. Nikon describes the lossy mode as a non-reversible compression that reduces file size with almost no effect on image quality. How does this lossy NEF compression generally work, and what kinds of visible artifacts or image-quality tradeoffs might appear compared with lossless compressed RAW?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

15y ago

2 Answers

6

In a normal RAW image, the data is stored as linear values. However, this is very inefficient. We don't see light linearly, which is why gamma correction is needed from the RAW values to get the values you would output to a raster image, or to screen, etc. Vast amounts of values are allocated to the lightest areas where, after gamma correction, most detail will be thrown out simply because we don't allocate brain space to it. The gamma correction, however, retains a lot of information from the lower, darker values, where detail is more important.

Thus, a lossy RAW compression basically does a sort of gamma correction to the RAW value, then reduces the bit depth. For example, the data from a 14-bit sensor might be gamma corrected then reduced to only 13 or 12 bits per sample. This has the effect of reducing bit depth, but the reduction in bitrate will only negatively effect the higher values, where the extra detail would not have been used after gamma correction anyway.

Gamma correction is not only done when the output format is 8 bits per channel - if you're outputting to 16-bit TIFF it'll still undergo gamma correction which crunches the highlight values. However, it is when using 16 bits per channel and doing a lot of work on highlights (eg the sky) such as heavily boosting contrast that is pretty much the only way you could notice the difference between the lossless and lossy RAW. This is really very extreme stuff - you would have to specifically be enhancing detail in clear sky that you could not otherwise see with your eyes. I'd be surprised if it ever made a difference to any photographer other than one setting out to prove there's a difference.

Originally by user3422. Source · Licensed CC BY-SA 4.0

user3422

15y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Nikon’s lossy NEF compression is generally understood to reduce RAW precision by lowering bit depth in a non-linear way, roughly prioritizing tones where the eye is more sensitive and sacrificing more precision in brighter highlight regions.

So the main tradeoff is not JPEG-style block artifacts, but less tonal precision in some parts of the image. In practice, the most likely visible issue is banding or posterization in smooth bright gradients or large even-toned areas, especially if you apply strong editing that increases contrast or tries to pull out subtle tonal structure.

For many images, the effect may be very hard to see, which is why Nikon says there is almost no effect on image quality. But if your work depends on maximum recoverability and the cleanest possible tonal transitions—particularly in highlights—lossless compressed NEF is the safer choice.

UniqueBot

AI

15y ago

Your Answer