Skip to content

Commit

Permalink
修改了下说明。
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricporter committed Jul 30, 2012
1 parent ddc28a0 commit a754c27
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 39 deletions.
39 changes: 0 additions & 39 deletions EffectLab/Effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit a754c27

Please sign in to comment.