[cairo] Downsampling bitmaps from RSVG quality

Samuel Williams space.ship.traveller at gmail.com
Fri Jul 24 03:28:26 PDT 2015


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 <emmanuel.pacaud at lapp.in2p3.fr>
wrote:

> Hi,
>
> Le ven. 24 juil. 2015 à 5:38, Samuel Williams <
> space.ship.traveller at gmail.com> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20150724/0e4403da/attachment.html>


More information about the cairo mailing list