From e57b00709623829283b25186a25cc3d4e5df4743 Mon Sep 17 00:00:00 2001 From: Cedric Porter Date: Sat, 14 Jul 2012 21:11:22 +0800 Subject: [PATCH] eee --- EffectLab/Effect.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/EffectLab/Effect.py b/EffectLab/Effect.py index 35d54f4..89c1bfc 100755 --- a/EffectLab/Effect.py +++ b/EffectLab/Effect.py @@ -61,16 +61,18 @@ def filter(self, img): found = 0 psum = (0, ) * nband - new_img.putpixel((x, y), (128, 128, 128, 255)) + # new_img.putpixel((x, y), (128, 128, 128, 255)) for ai in range(antialias): + _x = x + ai for aj in range(antialias): - _x = x + ai _y = y + aj u, v = self.warp(_x, _y, r, (cx, cy), (mx, my)) u = int(round(u)) v = int(round(v)) + if not (0 <= u < width and 0 <= v < height): + continue pt = img.getpixel((u, v)) psum = map(operator.add, psum, pt) found += 1