Accurate Image Manipulation for Desktop Publishing  
Calibration

Shading Comparison Between Linear and Gamma Compensated Images

    This page is suitable for viewing on uncalibrated PC monitors, the comparison is based on monitor gamma 2.5. The gamma 2.2 was not select here because the purpose is to experiment how the eye really sees the shading. Gamma 2.5 is rather accurately the gamma that is is in effect in PC systems, the value of 2.2 is a compromise between the Mac gamma 1.72 and PC gamma 2.5.
52 Step Linear Shading     52 step shading in gamma space 2.5 (incorrectly called as "the "perceptual coding") 
Both of the CGIs have a swatch with 52 sections, (51 intensity steps). The swatch is duplicated and aligned with offset of one intensity step to furher help with comparison. CGIs are compensated for gamma 2.5 viewing (on uncalibrated PC systems).

<- The CGI on the left shows how the banding happens in linear images. The intensity step is fixed, 2 %-unit (5 linear-light intensity levels). 

-> The CGI on the right show how the banding happens in images that have gamma compensation buried in. In other words the intensity steps are non-linear, "perceptionally coded", using the inverse gamma 2.5 function.

The linear image does have banding (or posterization) in the shadows.

The gamma image has banding from shadows all the way to the specular white, only the deep shadow end is free from the banding. Note also the muddy highlights in the gamma compensated swatch. 

 

The above banding will be visible only after extreme manipulation. Please see the below example images, there is no discernible banding in the shadows or elsewhere.
 

Original was converted into 8 bit, converted into grayscale, scaled by 50%, UnsharpMask at amout=100, radius=1 and Threshold=0 was applied. Then the image was gamma compensated by 1/2.5.  Saved to exact gif.
<-Left: linear space editing.

Right: gamma space editing. -> 


Original was gamma compensated by 1/2.5, converted into 8 bit, converted into grayscale, scaled by 50%, UnsharpMask at amout=100, radius=1 and Threshold=0 was applied. Saved to exact gif.

Note that the gamma space editing generated more artifacts, easiest seen in the deep shadows at the lower right corner of the images. No banding is seen in either of the images even in such a dark, low key image.

Please have a look at the gamma errors section almost all image manipulation that is done in a gamma space induces tonal range and hue errors.


Accurate Image Manipulation for Desktop Publishing
Copyright Timo Autiokari, 1998-2007. Contact info