[cairo] image downsampling quality

Krzysztof Kosiński tweenk.pl at gmail.com
Thu Jan 2 12:19:26 PST 2014

2014/1/2 Behdad Esfahbod <behdad at behdad.org>:
> On 14-01-02 07:09 PM, Ray Gardener wrote:
>> When using e.g. cairo_pattern_set_filter(pattern, CAIRO_FILTER_BEST) and
>> the pattern uses a bitmap surface, is the filter only for upsampling?
>> I have high-res bitmaps that, when drawn to occupy fewer canvas pixels
>> (downsampled),
>> they look like they're being nearest neighbour filtered.
> I think it's bilinear, which means if you are reducing to less than 50%, it
> misses pixels.
> There's been tons of talk and patches to fix this in pixman over the years.
> I'm not sure what the current status is.

The current trunk is fixed, and uses Lanczos3 downsampling for

CAIRO_FILTER_GOOD uses box downsampling, which is roughly equivalent
in quality to bilinear upsampling.

Regards, Krzysztof

More information about the cairo mailing list