<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><font class="Apple-style-span" face="arial" size="2">hello all</font><div style="font-family: arial; font-size: 10pt; "><br></div><div style="font-family: arial; font-size: 10pt; ">i've written some code to scale an image down, however the quality of the downsized image is poor compared to how the gimp or eog scales down.</div><div style="font-family: arial; font-size: 10pt; "><br></div><div style="font-family: arial; font-size: 10pt; ">i'm probably doing something wrong of course. a snippet from a class i've written:</div><div style="font-family: arial; font-size: 10pt; "><br></div><div><div><font class="Apple-style-span" face="arial" size="2"><span class="Apple-tab-span" style="white-space: pre; ">        </span>cairo_surface_t *new_surface = ::cairo_image_surface_create(this-&gt;format, new_width, new_height);</font></div><div><font class="Apple-style-span"
 face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>cairo_t *new_cr = ::cairo_create(new_surface);</font></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>::cairo_scale(new_cr, ratio, ratio);</font></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>::cairo_set_source_surface(new_cr, this-&gt;surface, 0, 0);</font></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2"><span class="Apple-tab-span" style="white-space:pre">
        </span>::cairo_pattern_set_filter(::cairo_get_source(new_cr), CAIRO_FILTER_BEST);</font></div><div><font class="Apple-style-span" face="arial" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>::cairo_pattern_set_extend(::cairo_get_source(new_cr), CAIRO_EXTEND_PAD);</font></div><div><font class="Apple-style-span" face="arial" size="2"><br></font></div><div><font class="Apple-style-span" face="arial" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>::cairo_paint(new_cr);</font></div></div><div style="font-family: arial; font-size: 10pt; "><br></div><div style="font-family: arial; font-size: 10pt; ">it doesn't seem to matter which pattern i use for cairo_pattern_set_filter the results appear to always be very similar. i must therefore be doing something incorrectly?</div><div style="font-family: arial; font-size: 10pt; "><br></div><div style="font-family: arial; font-size: 10pt; ">any help would be very much
 appreciated.</div><div style="font-family: arial; font-size: 10pt; "><br></div><div style="font-family: arial; font-size: 10pt; ">tristen.</div></td></tr></table>