Re: Concerns about using filters for downscaling

Krzysztof Kosiński <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAFLw2WRwvQ2su7u5C-7xyWr9TjSGzM890p+eUgahk=2PCweinA@mail.gmail.com>
2014-03-21 23:33 GMT+01:00 Owen Taylor <[email protected]>:
> Downsides with the general approach:
>
>  * The approach is not efficient for large downscales, especially
>    when transformed. Approaches involving:
>
>     - Sampling from a mipmap
>     - Sampling a sparse set of irregularly distributed points
>
>    will be more efficient.

Mipmapping would also help the case of drawing an image at e.g. 1/10
scale multiple times, which happens for example when interactively
resizing an image in Inkscape.

>  * On a hardware backend, running even a large convolution filter in
>    a shader is likely possible on current hardware, but it's not
>    taking efficient use of how hardware is designed to sample images.
>
> Here are my suggestions with an eye to getting a release of 1.14
> out quickly
>
>  * The convolution code is restricted to the BEST filter, leaving
>    GOOD and BILINEAR untouched for now. The goal in the future
>    is we'd try to get similar quality for all backends, whether by:
>
>     A) Triggering a fallback
>     B) Implementing convolution with the same filter
>     C) Using an entirely different technique with the similar
>        quality.

This would make Cairo 1.14 completely unusable for Inkscape, so we
would have to postpone the long overdue 0.91 release for another year
or more, and probably stop using Cairo. The downscaling method used in
1.12 is simply incorrect and due to severe visual artifacts makes it
impossible to use Inkscape to edit drawings that contain large
bitmaps, e.g. photos. It's no use being fast if the result is wrong.

Regards, Krzysztof
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.