[cairo] Fwd: problem with cairo scale

Kalle Vahlman kalle.vahlman at gmail.com
Thu Nov 29 00:05:30 PST 2007


2007/11/29, zaheer ahmad <zaheer.mot at gmail.com>:
> iam surprised by such basic issue. i hope iam missing something. i still
> dont know why a scaled down image looks good in gthumb on desktop vs cairo
> on a x86 scratchbox. Does it have to do something with graphic drivers
> supported on desktop.

As Dan was pointing out, this is a known limitation/bug in cairo, and
has been for quite some time:

  "Cairo's software has a bi-linear filter. And when downscaling at a
   factor greater than 2 the quality gets increasingly objectionable,
   (and quite soon gets to something I would call horrible) . So unless
   bi-linear means something very different than what cairo is doing,
   it's definitely not sufficient for all downscaling."

  http://lists.cairographics.org/archives/cairo/2006-June/007076.html

AFAIK the situation has not improved since then, so unless willing to
implement a better downscaling for cairo, your options are limited to
using an external library to scale the image data or to "live with
it".

GThumb likely uses some more sophisticated (and undoubtedly somewhat
slower) algorithm for it's downscaling, that's why it has far
superioir results.

I'm not sure if cairo supports scaling eg. xlib surfaces through
XRender which could be in turn implemented with the graphics hardware
to achieve both fast and good results.

-- 
Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi


More information about the cairo mailing list