The D7000 has two options for NEF compression: "Compressed" and "Lossless compressed" -- the manual says

NEF images are compressed using a non-reversible algorithm, reducing file size by about 40-55% with almost no effect on image quality.

What kind of compression is used for this? What kind of artifacts can I expect to see in a lossily-compressed NEF?


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.

| improve this answer | |

The compression is done by reducing the bit depth in a non-linear way so that detail is mostly lost in highlights of the image, where small differences in intensity is less visible.

You would possibly see artifacts in the form of banding if your picture contains a bright smooth surface, and if you process the image with a high contrast to bring out the structure of that surface.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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