4 releases (breaking)

0.4.0 Sep 4, 2021
0.3.0 Mar 9, 2021
0.2.0 Jul 4, 2020
0.1.0 Jan 18, 2020

#391 in Images

Download history 1980/week @ 2023-11-20 1928/week @ 2023-11-27 2068/week @ 2023-12-04 2097/week @ 2023-12-11 2014/week @ 2023-12-18 1277/week @ 2023-12-25 1378/week @ 2024-01-01 1974/week @ 2024-01-08 1708/week @ 2024-01-15 4358/week @ 2024-01-22 3305/week @ 2024-01-29 2949/week @ 2024-02-05 3836/week @ 2024-02-12 5503/week @ 2024-02-19 4705/week @ 2024-02-26 4679/week @ 2024-03-04

19,085 downloads per month
Used in 41 crates (6 directly)

MPL-2.0 license

74KB
1.5K SLoC

svgfilters

Crates.io Documentation

svgfilters provides low-level SVG filters implementation.

svgfilters doesn't implement the whole filters workflow, just operations on raster images. Filter region calculation, image colors (un)premultiplication, input validation, filter primitives order, transformations, etc. should be implemented by the caller.

Implemented filters

Unimplemented filters

  • feFlood, because it's just a simple fill.
  • feImage, because it can be implemented only by a caller.
  • feTile, because it's basically a fill with pattern.
  • feMerge, because it's just a layer compositing and a 2D library will be faster.
  • feOffset, because it's just a layer compositing with offset.

Performance

The library isn't well optimized yet, but it's mostly allocation free. Some methods will allocate necessary, temporary buffers which will be reflected in the documentation. But majority of methods will work on provided buffers.

License

svgfilters is licensed under the MPLv2.0.

Dependencies

~120KB