Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's a good post but IMHO does still conflate several things. The problem with "gamma" is that it's such an overloaded term.

1st. Human vision is not linear but is more sensitive to changes in low brightness conditions where a small change in input results in large change in perception. This is the so called "Stevens power law". The blog calls the perceptiply linear gradient ramp "gamma encoded" when it's really just adjusting for the non linearity of the human vision and employs "inverse of Stevens power law".

2nd. Because of the human sensitivity to differences in dark tones, a linear encoding when using limited bandwidth (i.e. 8 bits per color Channel) would allocate too many bits for the bright colors (that humans can't distinguish so well) and too little for the dark tones. The normal scheme is here is to encode the image using a "gamma" function that allocates the bits in a non linear fashion. This isn't often a simple gamma per se but a color space such as sRGB but the idea is the same.

3rd old CRT monitors had a characteristic behaviour so that 50% of input signal strength would not result in 50% of light emissions. this non linearity was also called "gamma". Modern LCDs etc panels then replicate this functionality for compatibility purposes.

However I believe the software/display circuitry these days correct for the display gamma so that if you write 0x808080 you'd indeed get 50% of light emission from the display. That means that the 2 really sort of interesting "gammas" are the encoding/decoding for storage and for producing changes in brightness that the human vision will perceive linearly.

Ps. I find that because of this overloading of the term gamma there's a lot of confusion and often if the result is correct it's by accident. I in fact prefer to call the whole thing "gamma incorrection" rather than correction since it's almost never correct in the whole software stack unless by accident. ;-)



> the software/display circuitry these days correct for the display gamma so that if you write 0x808080 you'd indeed get 50% of light emission from the display

That's precisely what I'm observing on my phone. The grayscale gradients, and downsampled checkerboard, images from the article look correct with gamma=1.0




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: