hi, <br>thanks for the inputs.. i could figure a way out based on the fact that scale greater than half gives a good resolution. so, right now i have done scale multiple times.<br><br>e.g. to scale 0.25, scale 0.5 write to surface, take the surface, scale
0.5 and write again.<br>this is giving good resolution. however this is slower.<br><br>regards,<br>Zaheer<br><br><div class="gmail_quote">On Nov 29, 2007 1:35 PM, Kalle Vahlman <<a href="mailto:kalle.vahlman@gmail.com">
kalle.vahlman@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2007/11/29, zaheer ahmad <<a href="mailto:zaheer.mot@gmail.com">
zaheer.mot@gmail.com</a>>:<br><div class="Ih2E3d">> iam surprised by such basic issue. i hope iam missing something. i still<br>> dont know why a scaled down image looks good in gthumb on desktop vs cairo<br>> on a x86 scratchbox. Does it have to do something with graphic drivers
<br>> supported on desktop.<br><br></div>As Dan was pointing out, this is a known limitation/bug in cairo, and<br>has been for quite some time:<br><br> "Cairo's software has a bi-linear filter. And when downscaling at a
<br> factor greater than 2 the quality gets increasingly objectionable,<br> (and quite soon gets to something I would call horrible) . So unless<br> bi-linear means something very different than what cairo is doing,
<br> it's definitely not sufficient for all downscaling."<br><br> <a href="http://lists.cairographics.org/archives/cairo/2006-June/007076.html" target="_blank">http://lists.cairographics.org/archives/cairo/2006-June/007076.html
</a><br><br>AFAIK the situation has not improved since then, so unless willing to<br>implement a better downscaling for cairo, your options are limited to<br>using an external library to scale the image data or to "live with
<br>it".<br><br>GThumb likely uses some more sophisticated (and undoubtedly somewhat<br>slower) algorithm for it's downscaling, that's why it has far<br>superioir results.<br><br>I'm not sure if cairo supports scaling eg. xlib surfaces through
<br>XRender which could be in turn implemented with the graphics hardware<br>to achieve both fast and good results.<br><font color="#888888"><br>--<br>Kalle Vahlman, <a href="mailto:zuh@iki.fi">zuh@iki.fi</a><br>Powered by
<a href="http://movial.fi" target="_blank">http://movial.fi</a><br>Interesting stuff at <a href="http://syslog.movial.fi" target="_blank">http://syslog.movial.fi</a><br></font></blockquote></div><br>