Closed
Description
The sRGB inverse transfer function, the one from the non-linear to the linear sRGB values, is given in the CSS spec with a comparison that diverges from the sRGB standard.
The CSS spec states:
if (abs < 0.04045) {
cl = c / 12.92;
}
// ...
But in the DIN EN 61966-2-1:2003-09, which is the German version of the EN 61966-2-1:2000 + A1:2003 (“sRGB standard”),
the comparison is stated using the less-than-or-equal operator, so the sample code should be:
if (abs <= 0.04045) { // note the use of the less-than-or-equal operator
cl = c / 12.92;
}
// ...
Is this deviation from the sRGB standard intentional? Is it negligible? Or is the German version of the sRGB standard incorrect?
The affected sections are:
- Section 10.2, in the code for the transfer function
- Section 17, in
function lin_sRGB(RGB)