Re: Downsampling bitmaps from RSVG quality

Samuel Williams <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAHkN8V-DxSbiXG0c-X7ZwrHCsDOW=ficju1WHez1KF+2jqc=9Q@mail.gmail.com>
Thanks.. that makes sense. It's too bad such an important issue is not more
"correctly" approachable, e.g. setting a filter option on rsvg or changing
the way cairo works to composite images. I appreciate your suggestion of
rendering to a higher resolution canvas.

On 24 July 2015 at 19:34, Emmanuel Pacaud <[email protected]>
wrote:

> Hi,
>
> Le ven. 24 juil. 2015 à 5:38, Samuel Williams <
> [email protected]> a écrit :
>
>> Yes, it has an embedded PNG file. IT's stupidly high resolution, but the
>> reality is it isn't downsampling it well for some reason with Cairo/RSVG
>> and it isn't obvious how to fix this.
>>
>>
>> https://drive.google.com/file/d/0B4svTYmRKR87eVR5LWoxQV9QQlU/view?usp=sharing
>>
>
> It looks like it is a limitation in both cairo and librsvg. In cairo, to
> my knowledge, the default filter is NEAREST, and it is not possible to
> define a different default.
>
> In librsvg, filter can not be changed.
>
> A possible workaround for you would be to use an intermediate bitmap
> surface bigger than the final one, render the SVG on it, then use it as a
> pattern with filter set to BEST on the small final surface.
>
>         Cheers,
>
>                 Emmanuel.
>
>

-- 
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.