[fxtf-drafts] [filter-effects-1] feConvolveMatrix with edgeMode=wrap and kernel matrix larger than target (#388)

RazrFalcon has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [filter-effects-1] feConvolveMatrix with edgeMode=wrap and kernel matrix larger than target ==
https://www.w3.org/TR/filter-effects-1/#feConvolveMatrixElement

The spec states that:

>wrap indicates that the input image is extended by taking the color values from the opposite edge of the image

But what if *image* is smaller than matrix? Should it overlap multiple times? 

I think that this case should be clearly specified, because currently everyone doing their own thing.

```xml
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
    <filter id="filter1">
        <feConvolveMatrix order="20 1" edgeMode="wrap" kernelMatrix="1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"/>
    </filter>
    <rect id="rect1" x="100" y="20" width="11" height="160" fill="green" filter="url(#filter1)"/>
    <rect id="frame" x="1" y="1" width="198" height="198" fill="none" stroke="black"/>
</svg>

```

![e-feConvolveMatrix-023](https://user-images.githubusercontent.com/725494/71433458-e5078e80-26e7-11ea-8dbb-1be993a954c5.png)

(diff is relative to Chrome)

And the same test, but with `kernelMatrix="0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1"`

![e-feConvolveMatrix-024](https://user-images.githubusercontent.com/725494/71433461-e8027f00-26e7-11ea-9bea-0d9acfd354a0.png)

(diff is relative to Chrome)

PS: Inkscape doesn't support `wrap` at all.

Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/388 using your GitHub account

Received on Wednesday, 25 December 2019 05:27:30 UTC