Open theotherphil opened 8 years ago
There is actually a linear-complexity blur already implemented in Rust, where execution time is independent of blur radius: https://github.com/fschutt/fastblur
I've recently optimized the implementation by a further 2.5x, but not all of my PRs are merged yet, so you'll need to either nag the maintainer to merge them or use my fork.
That repo is more or less a toy, feel free to copypaste it wholesale to imageproc and continue development over here.
Thanks for the link. (Turns out I didn't get round to looking at this after all. I'm still interested in implementing this functionality, but I'm not sure when it'll get done - if anyone else wants to give this a try they're not going to be stepping on my toes.)
resvg
crate recently got the linear complexity algorithm linked above to production quality. It now supports alpha channel as well as all color formats that shuffle RGBA. Now it also matches blur rendering in Chrome, so it appears to be correct.
If you want to integrate that algorithm in imageproc, I suggest backporting those changes into fastblur crate as described here and then using that crate from both imageproc and resvg.
e.g. http://arxiv.org/pdf/1107.4958.pdf, or https://www.mia.uni-saarland.de/Publications/gwosdek-ssvm11.pdf