[cairo] propsal for blur-API in cairo

Felipe Sanches felipe.sanches at gmail.com
Wed Jun 17 16:04:06 PDT 2009


this is something useful, for sure. I have implemented it in Inkscape.
In the SVG spec it is called "Convolve Matrix Filter". There is also
the "Gaussian Blur Filter", which has a completely independent
implementation in Inkscape. I think that a gaussian blur can be
implemented much more efficiently than a general kernel matrix filter.
Then, it is good to have them implemented independently so that we can
boost performance. The gaussian blur implementation in inkscape is our
only filter using multithreading code at the moment.

Inkscape would surely benefit from filtering primitives being
implemented in Cairo. It would make our code cleaner and it would
provide the functionality to other applications. Gnash, for instance,
also needs to implement filtering. Some filtering primitives in the
Flash spec are similar to the ones described in the SVG spec.

So, I would suggest a filtering API for cairo, instead of only blurs.

Felipe Sanches
(a.k.a. JucaBlues at #inkscape irc.freenode.net)

On Wed, Jun 17, 2009 at 5:59 PM, Leon
Woestenberg<leon.woestenberg at gmail.com> wrote:
> Hello,
>
> On Wed, Jun 17, 2009 at 10:23 PM, Mirco Müller<macslow at bangang.de> wrote:
>>
>>        The main idea is to introduce an opaque blur-object similar to a
>> gradient-pattern. You can set type and quality of it. Along those lines
>> also setters and getters for the numerous values controlling each
>> blur-type.
>>
> Nice idea, but why not a filter kernel matrix?
>
> First Google explanation:
>
> "A kernel filter works by applying a kernel matrix to every pixel in
> the image. The kernel contains multiplication factors to be applied to
> the pixel and its neighbors. Once all the values have been multiplied,
> the pixel is replaced with the sum of the products. By choosing
> different kernels, different types of filtering can be applied."
>
> Regards,
> --
> Leon
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>


More information about the cairo mailing list