summaryrefslogtreecommitdiffstats
path: root/module/plugins/captcha/LinksaveIn.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-10 01:55:52 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-10 01:55:52 +0100
commit7beb65e991bc6d1913c3b5bb2ef69e659d5b8342 (patch)
treee076082f6cb799a820eee287c47f24f082b3a41c /module/plugins/captcha/LinksaveIn.py
parent[DDLMusicOrg] Removed (diff)
downloadpyload-7beb65e991bc6d1913c3b5bb2ef69e659d5b8342.tar.xz
Spare code cosmetics
Diffstat (limited to 'module/plugins/captcha/LinksaveIn.py')
-rw-r--r--module/plugins/captcha/LinksaveIn.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/captcha/LinksaveIn.py b/module/plugins/captcha/LinksaveIn.py
index b5cb0f608..a7ae715fe 100644
--- a/module/plugins/captcha/LinksaveIn.py
+++ b/module/plugins/captcha/LinksaveIn.py
@@ -46,7 +46,7 @@ class LinksaveIn(OCR):
pix = frame.load()
for x in xrange(frame.size[0]):
for y in xrange(frame.size[1]):
- if lut[pix[x, y]] != (0,0,0):
+ if lut[pix[x, y]] != (0, 0, 0):
npix[x, y] = lut[pix[x, y]]
frame_nr += 1
new.save(self.data_dir+"unblacked.png")
@@ -112,7 +112,7 @@ class LinksaveIn(OCR):
rgb_bg = bglut[bgpix[x, y]]
rgb_c = lut[pix[x, y]]
if rgb_c == rgb_bg:
- orgpix[x, y] = (255,255,255)
+ orgpix[x, y] = (255, 255, 255)
def eval_black_white(self):
@@ -126,13 +126,13 @@ class LinksaveIn(OCR):
r, g, b = rgb
pix[x, y] = (255,255,255)
if r > max(b, g)+thresh:
- pix[x, y] = (0,0,0)
+ pix[x, y] = (0, 0, 0)
if g < min(r, b):
- pix[x, y] = (0,0,0)
+ pix[x, y] = (0, 0, 0)
if g > max(r, b)+thresh:
- pix[x, y] = (0,0,0)
+ pix[x, y] = (0, 0, 0)
if b > max(r, g)+thresh:
- pix[x, y] = (0,0,0)
+ pix[x, y] = (0, 0, 0)
self.image = new
self.pixels = self.image.load()