CairoSVG icon indicating copy to clipboard operation
CairoSVG copied to clipboard

Add filters

Open liZe opened this issue 11 years ago • 2 comments

Filters handled by cairo can be easily managed, but it's really hard for the other ones.

See: https://github.com/Kozea/CairoSVG/tree/master/test/fail/filter.

Some tests have been fixed by 7f4ac3cb9f and 7004283053.

liZe avatar May 10 '13 16:05 liZe

Are filters not supported? I have an SVG with some feGaussianBlur filters, but when I render to png, I cannot see them applied.

ahopkins avatar Oct 13 '19 10:10 ahopkins

Are filters not supported? I have an SVG with some feGaussianBlur filters, but when I render to png, I cannot see them applied.

It's not supported.

Some filters are already included in Cairo operators and blending modes, and they could be quite easily supported by CairoSVG. But some are not.

Gaussian blurs for example are raster transformations (and so are filters based on convolution matrices). Raster transformations are not easy to implement in Cairo, because they rely on computations on pixels while Cairo can render vector graphics.

If anyone finds a cool solution, I'm ready to implement it. But I've already spent a lot of time on this for WeasyPrint, and I wasn't satisfied with the result.

liZe avatar Nov 06 '19 14:11 liZe