[Image-SIG] PIL bug: Antialias.c bicubic filter error

David erwin94 at gmx.net
Wed May 26 04:23:27 CEST 2010


On May 9, 2010, at 4:03 AM, Xavier Ho wrote:
> On Sun, May 9, 2010 at 11:47 AM, David <erwin94 at gmx.net> wrote:
>        return (((a * x) - 5*a) * x + 8*a) * x - 4*a;
> 
> Hello David,
> I just factored out from your patch, as a comment to your post.
> 
> ((x - 5) * x + 8) * a * x - 4*a;
> 

Yes, of course, thanks!

Actually there seems to be another bug in that file, which becomes apparent when a is not 0:
The support of the filter is set to 0.5 for every magnification, which degrades ANTIALIAS and BICUBIC
resizing to something that looks close to BILINEAR. The attached patch attempts to fix both.

till then, David.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bicubic.patch
Type: application/octet-stream
Size: 923 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20100526/655fe997/attachment.obj>


More information about the Image-SIG mailing list