Inside GIMP, Colors -> Levels Click on the "Pick gray point" eyedropper (the middle eyedropper) and then click on a pixel in the image. Then go change to the Red/Green/Blue channels and you'll see that the gamma (middle triangle) is set to a float for each RGB channel.
What's the math behind this? Like if I know the RGB values of a pixel how do I calculate to get these 3 gamma numbers myself.
I want to write a script-fu that sets levels based on black/white/gray points. black and white points are straight forward, but this gray point deals with gamma and that's what's stopping me.
Thanks in advance!