4 ms·
It's not that being gamma-aware is "right" and most software does it "wrong" for speed. In many contexts, RGB values don't have gamma associated with them, jus
by dgreensp 16y ago
It's not that being gamma-aware is "right" and most software does it "wrong" for speed.
In many contexts, RGB values don't have gamma associated with them, just as they don't have ColorSync profiles or whatnot, or if they have one, it was just invented at some stage of processing. (Using the current screen gamma would be pretty arbitrary for an image editor.) Trying to "convert" between different gamma values during processing likely will do more harm than good if your entire pipeline doesn't have this philosophy, or worse, if only one program (e.g. Photoshop) or format (e.g. PNG) does.
I suppose PNG files win a prize for carrying gamma information, so that web browsers and image viewers can apply a curve in software that throws off their brightness and contrast relative to everything around them? And when Photoshop decides the colors in my GIF file need to be "converted" to sRGB from god-knows-what it thinks they were before?
If you want every last image operation to be done with perceptual accuracy, convert your images to some fancy color space like CIELAB, after careful consideration of their intended source gamma and color space, and do your calculations there; then somehow be sure they are accurately converted for display on the user's monitor.
- barrkel 16y agoWhat you write doesn't change the fact that nobody in practice uses a monitor with a 1.0 gamma. The (integer) average of 0 and 255 is 127, but the color (127,127,127) isn't 50% grey. That's the problem, and it isn't dependent on your image format, assuming it stores colors in the rgb space. Even assuming a gamma of 1.8 would mean less loss of detail when scaling down, even when the eventual viewer is eg using 2.2.
- baddox 16y agoThat's interesting. I've always heard of and seen "gamma curves," but I'm not a graphics guy and never gave it much thought. Is (127,127,127) lighter or darker than 50% grey? Do you have a link to an introduction on this topic and why I should care?
- barrkel 16y ago127,127,127 feels dark. The explanation is in the article: http://www.4p8.com/eric.brasseur/gamma.html#explanation http://www.4p8.com/eric.brasseur/gamma.html#explanation Basically, if you have a test image which consists of alternating black and white, it should have the same perceived brightness when you scale it down - but when you scale it down, the software needs to average out the black and white. If it does a simple arithmetic average, it'll probably choose 127,127,127 once it's downscaled enough to become uniform in color. But if you compare that uniform color with the original black and white lines, it looks a different shade - a darker shade. That's because 127,127,127 isn't 50% grey, it's not in the middle between black and white. The article has further explanation.