News for hackers. Stuff that matters.
Re:Widespread gamma error in image scaling algorithms (2007) by DarkShikari on Monday February 22, 2010 @01:28AM (#1142084)
the explanation here left my head spinning

Then here's a simpler explanation:

We need to blend pixel values X and Y.

Normal image-scaling algorithms perform the operation (X+Y)/2, because this is fast.

However, the correct operation is ToNonLinear((ToLinear(X)+ToLinear(Y))/2), because X and Y represent a nonlinear scale, similar to how adding a 60db and 60db sound doesn't result in a 120db sound.

Re:Widespread gamma error in image scaling algorithms (2007) by petewarden on Monday February 22, 2010 @01:36AM (#1142098)
The approach that helped me is thinking in photons. 50% in pixel values is only 25% of the photons that 100% in pixel values represents (approximately). Linear light measures just means converting to photons before you do any operations, and then converting them back to the encoding.

I almost wish gamma was a more obvious encoding process, like gzipping a file, rather than a simple function. That would save a lot of conceptual pain.