From a754c27dca8fbf18ee593f7d84899e3696ea6745 Mon Sep 17 00:00:00 2001 From: Cedric Porter Date: Mon, 30 Jul 2012 15:07:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=8B=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EffectLab/Effect.py | 39 --------------------------------------- README.md | 1 + 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/EffectLab/Effect.py b/EffectLab/Effect.py index 7e38348..e0b8088 100755 --- a/EffectLab/Effect.py +++ b/EffectLab/Effect.py @@ -316,45 +316,6 @@ def filter(self, img): warp = RegionWarpEffect(f, self.antialias) return warp(img) -# class WaveEffect(Effect): -# name = 'Wave Effect' -# def __init__(self, vertical_delta=0.1, horizon_delta=0, box=None): -# self.vertical_delta = vertical_delta -# self.horizon_delta = horizon_delta -# self.box = box - -# def filter(self, img): -# if self.box == None: -# left, top = 0, 0 -# right, bottom = img.size[0] - 1, img.size[1] - 1 -# else: -# left, top, right, bottom = self.box - -# width, height = img.size - -# mid_x = (right + left) / 2.0 -# mid_y = (top + bottom) / 2.0 - -# new_img = img.copy() -# height_delta = (bottom - top + 1) * self.vertical_delta -# width_delta = 2 * math.pi / (right - left + 1) * (self.horizon_delta + 1) -# for x in xrange(left, right): -# degree = x * width_delta -# for y in xrange(top, bottom): - -# # distortion -# h = sin(degree) * height_delta * ((bottom - top) / 2 - sqrt((y - mid_y) ** 2 + (x - mid_x) ** 2)) / mid_y -# offset = int(round(h)) -# _x = x -# _y = y + offset - -# if 0 < x < width and 0 < _y < height: -# new_img.putpixel((x, y), img.getpixel((x, _y))) -# else: -# new_img.putpixel((x, y), Effect.empty_color) - -# return new_img - class EffectGlue(Effect): name = 'Effect Glue' diff --git a/README.md b/README.md index 57810b3..de792b3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ EffectLab ========= EffectLab is an image processing laboratory written by Python for agilely testing algorithm. +Some Effect is rewritten by C. Author: Hua Liang [Stupid ET]