[cairo] [Pixman] Better quality downsampling in cairo/pixman
alex.shulgin at gmail.com
Tue Jul 13 23:46:03 PDT 2010
On Wed, Jun 30, 2010 at 18:57, Soeren Sandmann <sandmann at daimi.au.dk> wrote:
> The place to add new filters is in pixman. Here are two old mails on
> the subject:
> Simply adding a bicubic interpolation filter is relatively
> straight-forward. All you have to do it write a new
> bits_image_fetch_pixel_bicubic() in pixman-bits-image.c.
> However, while a bicubic interpolation is better than bilinear and
> would make upscaling look better, it wouldn't have that much effect on
> downscaling. For downscaling, the basic problem is that we are
> ignoring way too many source pixels, and not so much the quality of
> the filter function itself.
> The suggestion in the two mails above is therefore to add another
> filtering stage where the transformed image is resampled using a
> configurable filter kernel with a configurable sampling rate.
Pardon my silence, some stuff was keeping me too busy for this. :)
So if I understand correctly, Jeff's patch is good, but it's too
specialized for resampling pixman images wholesale, while it would be
better to make possible resampling for individual destination pixels
While I'll start digging in that direction, please make any notes to
correct me if I'm not quite right here.
I'll try to use sample Emacs screenshots from my first mail in this
thread for testing. Does anyone have any good samples to demonstrate
resampling quality difference which I might find useful?
More information about the cairo