channel mixer output not same as Manual predicts

In the GIMP, I made a simple gray image, voila:

I added a green value of 1.000 into the red channel mixer:

The manual predicts that the red channel output will be:

122*1+122*1+122*0 = 244

But no, the review image shows a red channel output of 168!

Please note that ‘Preserve luminosity’ was not selected.

Why the difference, anybody?

P.S.

GIMP version is 2.10.34, manual came with the download.

What are the blend modes doing… I don’t have gimp installed at the moment… I see a blend mode of replace…what else could be selected…

Welcome to the wonderful world of gamma-correction and sRGB colorspace.

Your 122 in a [0 .. 255] range is 0.4784 in a [0.0 .. 1.0] range. But these values are gamma-corrected (more accurately, sRGB-corrected) , and correspond to 0.19462 of the “linear light”. In other words, if you display (122,122,122) on your screen, this emits 19.46% of the light you would get if you displayed pure white (255,266,255).

So 0.19462 + 0.19462 = 0.38924 (which is a “linear light” value) and if you compute the corresponding gamma/sRGB-corrected value you get 0.65705 which is 168 in your friendly [0 .. 255] range.

Of course, if the image has a color profile which is not sRGB, I assume that Gimp will take this in account as well.

Some more explanations and experiments on all this here.

A table of sRGB ⟺ Linear conversions:
sRGB.ods (58.4 KB)

2 Likes

The available blend modes seem to be the same as the layer blend modes - some cause a different output, some do not e.g. ‘replace’ gives same result as ‘normal’. Somewhere I have a page showing a formula for each mode.

later …

Replace in GEGL tools is just a full overlay of the source layer (ie, what you usually want).

1 Like

Thanks… the gamma of the profile was the next thing I was going to suggest and you explained it quite nicely…

Thanks! I did wonder about that …

Makes sense and I’m now off to play with whatever mixers I have such as RT to see what they come up with …

… and now for something completely different …

RT came up with 202 i.e. neither 244 nor 168.

G’MIC’s RGB mixer sliders do not correlate directly to any others that I’ve played with - so gave up on that, grump.

Like @thehatterman & others, I am becoming less and less impressed by the dreaded Channel Mixer.

RawTherapee uses ProPhoto with gamma = 1.8 (sRGB uses an encoding that approximates gamma 2.2).

Correct. I changed it to sRGB and the number did change appropriately.