<div dir="ltr">On Mon, Sep 14, 2015 at 11:52 AM, Søren Sandmann <span dir="ltr"><<a href="mailto:soren.sandmann@gmail.com" target="_blank">soren.sandmann@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
A separate possibility is a flag that says "all pixels whose weights are<br>
non-zero are inside the borders of the source image". Is this useful<br>
information? It might be, and if so, it could be conveyed through some<br>
new flag, though I'd echo Siarhei's comment about whether this is<br>
something that happens in practice.<br></blockquote><div><br></div><div>I believe this *is* what happens in practice, much more often.<br><br></div><div>The clip regions are not random, they are chosen by programmers for specific purposes. One thing that is wanted is to scale images up and preserve sharp edges. In Cairo this requires trimming the partial pixels off the edge. This will produce a clip that will turn on this flag. The alternative version of the flag will require the program to clip off at least one opaque pixel from two edges for scale factors less than 2. There is far less reason for a program to do that.<br><br></div><div>Therefore I think this version of the flag will actually be used far more often, easily making up for the expense of adding the test for the zero-weight pixel to the bilinear fast paths.<br><br></div><div><br></div><div><br></div></div><br></div></div>