|
|
Am 10/18/2020 um 23:22 schrieb Bald Eagle:
>
> The new tone-adjusting formulas are:
>
> #declare SRGB_Encode = function (C, M) {
> select (C-0.0031308, C*12.92*M, C*12.92*M, (1.055 * pow (C, 1/2.4) - 0.055)*M)
> }
>
> #declare SRGB_Decode = function (C, M) {
> select (C-0.040449936, C/12.92, pow ((C+0.055)/1.055, 2.4)*M)
> }
>
> using M as a multiplier. Looks like it works correctly
>
Nope. Both functions are wrong far all M <> 1.0!
If you do not already see this by looking at the formulas just check it:
Use SRGB_Encode for any value of C and then the result for SRGB_Decode.
This should give the original value of C.
The correct functions would be
#declare SRGB_Encode = function (C, M) {
select (C*M-0.0031308, C*12.92*M, C*12.92*M, (1.055 * pow (C*M, 1/2.4)
- 0.055))
}
#declare SRGB_Decode = function (C, M) {
select (C-0.040449936, C/12.92, pow ((C+0.055)/1.055, 2.4))*M
}
It worries me for this NG that stuff like this stays uncorrected for
over 10 days.
-Ive
Post a reply to this message
|
|