From 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- module/plugins/captcha/LinksaveIn.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'module/plugins/captcha/LinksaveIn.py') diff --git a/module/plugins/captcha/LinksaveIn.py b/module/plugins/captcha/LinksaveIn.py index e8487c387..6535dd11f 100644 --- a/module/plugins/captcha/LinksaveIn.py +++ b/module/plugins/captcha/LinksaveIn.py @@ -26,6 +26,7 @@ class LinksaveIn(OCR): OCR.__init__(self) self.data_dir = dirname(abspath(__file__)) + sep + "LinksaveIn" + sep + def load_image(self, image): im = Image.open(image) frame_nr = 0 @@ -53,6 +54,7 @@ class LinksaveIn(OCR): self.pixels = self.image.load() self.result_captcha = '' + def get_bg(self): stat = {} cstat = {} @@ -89,6 +91,7 @@ class LinksaveIn(OCR): max_p = value return bg + def substract_bg(self, bgpath): bg = Image.open(bgpath) img = self.image.convert("P") @@ -111,6 +114,7 @@ class LinksaveIn(OCR): if rgb_c == rgb_bg: orgpix[x, y] = (255,255,255) + def eval_black_white(self): new = Image.new("RGB", (140, 75)) pix = new.load() @@ -132,6 +136,7 @@ class LinksaveIn(OCR): self.image = new self.pixels = self.image.load() + def get_captcha(self, image): self.load_image(image) bg = self.get_bg() -- cgit v1.2.3