The <feConvolveMatrix> SVG filter primitive applies a matrix convolution filter effect. A convolution combines pixels in the input image with neighboring pixels to produce a resulting image. A wide variety of imaging operations can be achieved through convolutions, including blurring, edge detection, sharpening, embossing and beveling.
| Categories | Filter primitive element |
|---|---|
| Permitted content | Any number of the following elements, in any order:<animate>, <set>
|
This element implements the SVGFEConvolveMatrixElement interface.
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<filter id="emboss">
<feConvolveMatrix
kernelMatrix="3 0 0
0 0 0
0 0 -3"/>
</filter>
</defs>
<image xlink:href="/files/12668/MDN.svg" x="0" y="0"
height="200" width="200" style="filter:url(#emboss);" />
</svg> | Specification | Status | Comment |
|---|---|---|
| Filter Effects Module Level 1 The definition of '<feConvolveMatrix>' in that specification. | Working Draft | |
| Scalable Vector Graphics (SVG) 1.1 (Second Edition) The definition of '<feConvolveMatrix>' in that specification. | Recommendation | Initial definition |
| Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | ? |
| Feature | Android | Edge | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | ? | (Yes) | ? | ? | ? | ? |
<filter><animate><set><feBlend><feColorMatrix><feComponentTransfer><feComposite><feDiffuseLighting><feDisplacementMap><feFlood><feGaussianBlur><feImage><feMerge><feMorphology><feOffset><feSpecularLighting><feTile><feTurbulence>
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feConvolveMatrix