Bug 136418 - SVG filter effect feGaussianBlur unexpectedly lightens image using linearRGB
Summary: SVG filter effect feGaussianBlur unexpectedly lightens image using linearRGB
Status: RESOLVED DUPLICATE of bug 212649
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P3 Normal
Assignee: frankhome61
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-31 10:45 PDT by David Bonnet
Modified: 2020-06-11 20:37 PDT (History)
7 users (show)

See Also:


Attachments
SVG example showing the blur effect with sRGB and linearRGB (1.79 KB, image/svg+xml)
2014-08-31 10:45 PDT, David Bonnet
no flags Details
Rendering comparison between Chrome and WebKit Nightly (75.49 KB, image/png)
2014-08-31 10:51 PDT, David Bonnet
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Bonnet 2014-08-31 10:45:10 PDT
Created attachment 237428 [details]
SVG example showing the blur effect with sRGB and linearRGB

When using a gaussian blur filter effect, the resulting image is lightened when using linearRGB for color interpolation. The attached file shows the color alteration. When using the sRGB for color interpolation, results are consistent across browsers, yet the blur effect is less desirable.

This bug has been witnessed on several occasions:
- http://stackoverflow.com/questions/24295043/svg-gaussian-blur-in-safari-unexpectedly-lightens-image
- http://stackoverflow.com/questions/22615663/safari-renders-wrong-colors-when-using-blur-filter

From the comments on the pages mentioned above, it seems to have been introduced since Safari 7.
Comment 1 David Bonnet 2014-08-31 10:51:35 PDT
Created attachment 237429 [details]
Rendering comparison between Chrome and WebKit Nightly
Comment 2 Alexey Proskuryakov 2014-08-31 23:57:43 PDT
>From the comments on the pages mentioned above, it seems to have been introduced since Safari 7.

I can reproduce this with Safari 7.0.6 on OS X 10.9.4, so this doesn't look like a regression despite the above.
Comment 3 Simon Fraser (smfr) 2018-01-03 16:57:03 PST
I thikn the bug here is that FilterEffect::imageBufferResult() just splats m_premultipliedImageResult into m_imageBufferResult without any linearRGB -> sRGB conversion, and transformResultColorSpace() does nothing for CG (because it assumes that the result will be obtained by painting via CG, which is not accurate).
Comment 4 Simon Fraser (smfr) 2018-01-03 16:57:27 PST
Bug 180565 is the same issue, but on input.
Comment 5 Simon Fraser (smfr) 2018-01-03 17:03:35 PST
(In reply to Simon Fraser (smfr) from comment #4)
> Bug 180565 is the same issue, but on input.

That's the wrong bug. I meant bug 181267.
Comment 6 frankhome61 2020-06-11 13:15:26 PDT
This bug is fixed in a recent patch https://bugs.webkit.org/show_bug.cgi?id=212649
Comment 7 Simon Fraser (smfr) 2020-06-11 20:37:24 PDT

*** This bug has been marked as a duplicate of bug 212649 ***