[cairo] Box filtering code

Bill Spitzak spitzak at d2.com
Wed Mar 7 03:33:32 PST 2007

jose_ogp at juno.com wrote:
> 	Bill Spitzak wrote:
>> The more immediate and useful solution for Cairo is to do filtered
>> sampling of more than 4 pixels of the source image. I believe that
>> for Cairo, a pixel-aligned box filter is quite sufficient, and has
>> the advantage of blending smoothly with how cairo enlarges images.
>> The following will do it, there is just a small matter of optimizing
>> it  :-)
>> ....
>> ....
> 	Seems like a reasonable start. :)
> 	It might take some work, but if you could write out an actual
> working sample implementation, I'm sure optimizations could be made
> to follow.

Well this is not a working implementation but I hope it will get things 
started and it was not a waste of time to type this all in. I have no 
idea where this goes into Cairo, or if it has to go into the XRender or 
pixman code.

This is entirely written from scratch without any cut & paste to avoid 
any possible IP problems. I release it entirely into the public domain.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.C
Type: text/x-c++src
Size: 8191 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070307/63d8a762/sample.c++

More information about the cairo mailing list