On 24 Mar 2008 15:04:13 +0100, Soeren Sandmann &lt;<a href="mailto:sandmann@daimi.au.dk">sandmann@daimi.au.dk</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">A pixman image is an array of pixels, where the top left pixel has<br></div>
coordinates (0.5, 0.5). But the scaling actually has (0, 0) as the<br>
center and not (0.5, 0.5).<br>
<br>
In your test case, the top left destination pixel with coordinates<br>
(0.5, 0.5) gets transformed into (0.25, 0.25). The bilinear filter<br>
then finds the four closest pixels to those coordinates:<br>
<br>
 &nbsp; (-0.5, -0.5), (0.5, -0.5), (-0.5, 0.5) and (0.5, 0.5).<br>
<br>
Three of these are outside the source image, so they are treated as<br>
transparent. The last one is opaque white, so the result of the<br>
resampling is a translucent gray.<br>
</blockquote><br></div>Right, thanks.<br><br>My intuition was that we should sample only the pixels that intersect the scaled-down target pixel, i.e. the rectangle (0,0)-(0.5,0.5). I guess there&#39;s probably a reason we don&#39;t do it that way, so OK.<br>
<br clear="all">Rob<br>-- <br>&quot;He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all.&quot; [Isaiah 53:5-6]