let f(x) = ((x + 0.055) / 1.055) ^ 2.4 f(x)^(-1) (inverted formula) is ((x ^ (1 / 2.4)) * 1.055) - 0.055 instead of ((x * 1.055) ^ (1 / 2.4)) - 0.055
Created attachment 55357 [details] patch
Created attachment 55359 [details] Updated ChangeLog
Comment on attachment 55359 [details] Updated ChangeLog > + color = (pow(color, 1.0f / 2.4f) * 1.055f) - 0.055f; Shouldn't this be powf? Using pow means we'll convert to double and then back to float.
Created attachment 55458 [details] change pow to powf Darin, nice catch.
(In reply to comment #3) > (From update of attachment 55359 [details]) > > + color = (pow(color, 1.0f / 2.4f) * 1.055f) - 0.055f; > > Shouldn't this be powf? Using pow means we'll convert to double and then back > to float. Right, sorry. Didn't see that.
This does not affect mac pixel tests?
(In reply to comment #5) > (In reply to comment #3) > > (From update of attachment 55359 [details] [details]) > > > + color = (pow(color, 1.0f / 2.4f) * 1.055f) - 0.055f; > > > > Shouldn't this be powf? Using pow means we'll convert to double and then back > > to float. > > Right, sorry. Didn't see that. No it doesn't. The code is just used for Chromium Gtk and Qt.
Landed in r59002 : http://trac.webkit.org/changeset/59002 Closing bug.