[Webkit-unassigned] [Bug 113174] Composing a filter with the identity function shouldn't change its effect.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 25 10:37:47 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=113174





--- Comment #7 from Stephen Chenney <schenney at chromium.org>  2013-03-25 10:40:14 PST ---
(In reply to comment #6)
> (In reply to comment #5)
> > > I think the version with the invert-plus-identity filter is actually correct
> > 
> > Not unless I'm misunderstanding the spec. I did a screenshot and measured the color values, and Chrome's invert is doing exactly what I'd expect in linearRGB space, i.e. each color value x maps to exactly 1.0 - x.
> > 
> > It does appear that adding a second filter is causing it to switch to sRGB.
> > 
> > The spec says that filters should be linearRGB unless otherwise specified - or am I reading it wrong?
> 
> Yes, color-interpolation-filters defaults to linearRGB.  However, my understanding is that input images and the output device are assumed to be in sRGB space (unless specified otherwise), so filters being applied in linearRGB means that the code must apply a conversion from sRGB to linear, do the filter math in linear space, then convert back to sRGB (or whatever the device color space is).
> 
> By specifying sRGB for color-interpolation-filters, you're actually requesting the filter math to be performed in sRGB color space, so no conversions are necessary (although the math is technically wrong).

Stephen is right. I put a lot of effort recently into getting the color spaces right, and his explanation matches the way things are implemented now (or should be implemented).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list