[cairo] Fwd: problem with cairo scale

zaheer ahmad zaheer.mot at gmail.com
Mon Nov 26 06:29:21 PST 2007


---------- Forwarded message ----------
From: zaheer ahmad <zaheer.mot at gmail.com>
Date: Nov 26, 2007 11:25 AM
Subject: problem with cairo scale
To: cairo-request at cairographics.org


hi ,
iam trying to scale a image (rediff.html) with cairo and the scaled
down image resolution is very bad. i tried different settings like
setting the pattern filter (nearest, gausion, best etc) but it does
not help.

the same image scaled down with a image viewer (gthumb) has good clarity.

find attached the images.
Let me know if this is a limitation with cairo scaling or if iam
missing something basic.

image = cairo_image_surface_create_from_png ("rediff.png");
    //cairo_set_antialias(g_pCairoContext, CAIRO_ANTIALIAS_GRAY);
//    cairo_pattern_set_filter (cairo_get_source (g_pCairoContext),
CAIRO_FILTER_BEST);
    cairo_scale(g_pCairoContext,0.2,0.2);
    cairo_set_source_surface(g_pCairoContext, image, 0,0);
    cairo_paint(g_pCairoContext);

thanks in advance for any help. attached screen shots

Regards,
Zaheer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rediff-scale-0.2.png
Type: image/png
Size: 5653 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071126/32d5bc2b/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rediff-scale-gthumb.png
Type: image/png
Size: 9582 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071126/32d5bc2b/attachment-0003.png 


More information about the cairo mailing list