Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Layer Mode: Addition equation is working differently to official guide
#3
(03-07-2024, 08:50 AM)Ofnuts Wrote: No, because Gimp 2.10 is working in "Linear light". 

The 0 .. 255 values are gamma-corrected. In other words,they don't represent directly the amount  of light in the color channel, but some encoding which is convenient to pack as much as possible of the visual range in 255 values, taking in consideration that our eyes are more sensitives to differences in low values.

If you image is in some high precision linear mode, you can check the linear value with the Pixel representation in the Pointer and Sample points dialog

In theory this would mean:

Linear = ( RGB255 / 255 ) ^ 2.2

and

RGB255 = 255 * ( Linear ^ ( 1 / 2.2 ) )

In practice the conversion is done using the image color profile but if the color profile is sRGB (which is the case most of the time), the formulas above give a good approximation.

For instance your top color:



So Addition mode  is really "Convert to Linear, add the values, convert back to RGB255", and using the formulas you are not so far off:





Note that you can ask Gimp to work directly with the RGB255 values, by using the "Legacy" layer modes:



In which case the result is probably what you expect:



However, if this makes mathematical sense, this has no relation to the physical reality.

Thanks a lot, Ofnuts. Now I realize why the official guide says "pixel value". May I ask another question? I'd like to learn more about the concept of "Linear light". Would you recommend any reference or documentation? I did several Google searches but I didn't get any good answer. Thanks in advance!
Reply


Messages In This Thread
RE: Layer Mode: Addition equation is working differently to official guide - by wonder13662 - 03-07-2024, 01:01 PM

Forum Jump: