Open
Description
https://drafts.fxtf.org/filter-effects/#propdef-color-interpolation-filters, https://drafts.fxtf.org/filter-effects/#feMergeElement
Let's say I have something like this:
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<filter id="filter1" filterUnits="userSpaceOnUse" width="200" height="200">
<feGaussianBlur in="SourceGraphic" stdDeviation="1" color-interpolation-filters="sRGB" result="blur1"/>
<feGaussianBlur in="SourceGraphic" stdDeviation="1" color-interpolation-filters="linearRGB"/>
<feOffset dx="40" dy="40" result="blur2"/>
<feMerge color-interpolation-filters="linearRGB">
<feMergeNode in="blur1"/>
<feMergeNode in="blur2"/>
</feMerge>
</filter>
<g filter="url(#filter1)">
<rect x="40" y="40" width="40" height="40" fill="yellow"/>
<rect x="60" y="60" width="40" height="40" fill="blue"/>
</g>
<rect x="1" y="1" width="198" height="198" fill="none" stroke="black"/>
</svg>
- What color space
feMergeNode
should use? The one that set on the parentfeMerge
or on the result primitive? - I have to convert all
in
images/buffers to the specified color space, than merge them, than convert the result back to sRGB? Or should I leave it in the specified color space?
This one actually affects all filters. Should the result be kept in the specified color space or should it be converted back to sRGB?
The actual results are mostly ok. The main problem is that Batik breaks colors and my application have a wrong color on the overlapped part.
* the diff is relative to Chrome