Thu May 09, 2024 3:48 pm
Fri May 10, 2024 3:06 am
Fri May 10, 2024 11:24 am
Fri May 10, 2024 11:32 am
Fri May 10, 2024 7:51 pm
Bruce E wrote:GAMMA CORRECTION!! I've often heard of it, but before now I've never taken the dive into learning what it means.
I think that's exactly what I need to understand in order to answer my question.
Sun May 12, 2024 10:54 am
ofnuts wrote:Bruce E wrote:GAMMA CORRECTION!! I've often heard of it, but before now I've never taken the dive into learning what it means.
I think that's exactly what I need to understand in order to answer my question.
Some explanations here until I find the time to make a more complete tutorial.
Sun May 12, 2024 6:06 pm
Bruce E wrote:ofnuts wrote:Bruce E wrote:GAMMA CORRECTION!! I've often heard of it, but before now I've never taken the dive into learning what it means.
I think that's exactly what I need to understand in order to answer my question.
Some explanations here until I find the time to make a more complete tutorial.
That thread answers my fundamental question perfectly. I've updated my spreadsheet experiment, and it now looks right for the addition function.
I still haven't reproduced the intersection function, probably because I just haven't guessed the correct algebraic expression. Taking the mean of the values seems close, but I'm not sure that's right.
Mon May 13, 2024 12:40 pm
ofnuts wrote:If you are using a spreadsheet, the exact formulas for sRGB (which is what Gimp uses by default) are:
sRGB (0. to 1.) -> Linear (0. to 1.): =IF(XX<=0.04045,XX/12.92,POWER((XX+0.055)/1.055,2.4))
Linear (0. to 1.) -> sRGB (0. to 1.): =IF(XX<0.0031308,XX*12.92,1.055*POWER(XX,1/2.4)-0.055)
Multiply/divide by 255 if you use the [0..255] range.
Tue May 14, 2024 2:25 am
Bruce E wrote:ofnuts wrote:If you are using a spreadsheet, the exact formulas for sRGB (which is what Gimp uses by default) are:
sRGB (0. to 1.) -> Linear (0. to 1.): =IF(XX<=0.04045,XX/12.92,POWER((XX+0.055)/1.055,2.4))
Linear (0. to 1.) -> sRGB (0. to 1.): =IF(XX<0.0031308,XX*12.92,1.055*POWER(XX,1/2.4)-0.055)
Multiply/divide by 255 if you use the [0..255] range.
Excellent - thank you! I had been hoping to see the actual algorithm or code but didn't know if anyone would be able to provide it. In fact, I had been thinking of downloading the source code to see if I could locate the functions, but I haven't gotten that far yet.
I am using a spreadsheet, so I'll use the formulas you provided. I'm sure they'll work as expected, and then I'll enjoy solving the puzzle of reverse-engineering the formulas to be sure I understand how the hard-coded parameters map to the gamma correction function. I'm guessing that they use gamma = 2.4 (?).
I'm still not sure how the intersect function works, since that takes two input values, but maybe it will become clear once I've updated my spreadsheet.
Tue May 14, 2024 11:34 am
ofnuts wrote:
Actually I just implemented the formulas described here, and to my great joy, found that it produced the same values as Gimp. Also have the Python code if you are interested.
Intersection is "Darken only" so it just takes the lower of the two values (and this doesn't require a conversion to linear since the conversion is strictly monotone)
Tue May 14, 2024 2:46 pm
Bruce E wrote:(And I might take you up on the offer of Python code once I've gotten a little farther.)
Tue May 14, 2024 6:19 pm
ofnuts wrote:Bruce E wrote:(And I might take you up on the offer of Python code once I've gotten a little farther.)
Best place to ask when you get there (faster answers, usually).