Serene Life

by garik

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

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.

share|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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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