RESOLVED FIXED Bug 38735
ImageBuffer::transformColorSpace : linear RGB -> sRGB conversion formula error
https://bugs.webkit.org/show_bug.cgi?id=38735
Summary ImageBuffer::transformColorSpace : linear RGB -> sRGB conversion formula error
Zoltan Herczeg
Reported 2010-05-07 03:46:04 PDT
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
Attachments
patch (2.24 KB, patch)
2010-05-07 03:57 PDT, Zoltan Herczeg
no flags
Updated ChangeLog (2.31 KB, patch)
2010-05-07 04:10 PDT, Zoltan Herczeg
no flags
change pow to powf (2.31 KB, patch)
2010-05-07 21:08 PDT, Zoltan Herczeg
krit: review+
Zoltan Herczeg
Comment 1 2010-05-07 03:57:13 PDT
Zoltan Herczeg
Comment 2 2010-05-07 04:10:16 PDT
Created attachment 55359 [details] Updated ChangeLog
Darin Adler
Comment 3 2010-05-07 17:31:51 PDT
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.
Zoltan Herczeg
Comment 4 2010-05-07 21:08:54 PDT
Created attachment 55458 [details] change pow to powf Darin, nice catch.
Dirk Schulze
Comment 5 2010-05-07 21:48:39 PDT
(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.
Nikolas Zimmermann
Comment 6 2010-05-07 22:17:40 PDT
This does not affect mac pixel tests?
Dirk Schulze
Comment 7 2010-05-07 22:23:15 PDT
(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.
Zoltan Herczeg
Comment 8 2010-05-07 23:32:06 PDT
Note You need to log in before you can comment on or make changes to this bug.