diff options
Diffstat (limited to 'module/plugins/captcha/CircleCaptcha.py')
-rw-r--r-- | module/plugins/captcha/CircleCaptcha.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/captcha/CircleCaptcha.py b/module/plugins/captcha/CircleCaptcha.py index 93bacae32..7df986b5e 100644 --- a/module/plugins/captcha/CircleCaptcha.py +++ b/module/plugins/captcha/CircleCaptcha.py @@ -31,7 +31,7 @@ class ImageSequence: class CircleCaptcha(OCR): __name__ = "CircleCaptcha" __type__ = "ocr" - __version__ = "1.07" + __version__ = "1.08" __status__ = "testing" __description__ = """Circle captcha ocr plugin""" @@ -138,7 +138,7 @@ class CircleCaptcha(OCR): jump = False continue - if (curpix < self.BACKGROUND and color == -1) or (curpix is color and color > -1): + if (curpix < self.BACKGROUND and color == -1) or (curpix == color and color > -1): if jump is False: #: Found pixel curcolor = curpix @@ -168,7 +168,7 @@ class CircleCaptcha(OCR): #: Found last pixel and the first white break - if (curpix < self.BACKGROUND and color == -1) or (curpix is color and color > -1): + if (curpix < self.BACKGROUND and color == -1) or (curpix == color and color > -1): #: Found pixel curcolor = curpix newx = x, curcolor @@ -199,7 +199,7 @@ class CircleCaptcha(OCR): #: Found last pixel and the first white break - if (curpix < self.BACKGROUND and color == -1) or (curpix is color and color > -1): + if (curpix < self.BACKGROUND and color == -1) or (curpix == color and color > -1): #: Found pixel curcolor = curpix newy = y, color @@ -521,7 +521,7 @@ class CircleCaptcha(OCR): return result curpix = pix[x, y] - if (curpix is color and color > -1) or (curpix < self.BACKGROUND and color == -1): + if (curpix == color and color > -1) or (curpix < self.BACKGROUND and color == -1): if curpix > self.BLACKCOLOR: result = 1 else: @@ -531,7 +531,7 @@ class CircleCaptcha(OCR): if exact is False: if x + 1 < im.size[0]: curpix = pix[x+1, y] - if (curpix is color and color > -1) or (curpix < self.BACKGROUND and color == -1): + if (curpix == color and color > -1) or (curpix < self.BACKGROUND and color == -1): if curpix > self.BLACKCOLOR: result = 1 if curpix <= self.BLACKCOLOR: @@ -539,7 +539,7 @@ class CircleCaptcha(OCR): if x > 0: curpix = pix[x-1, y] - if (curpix is color and color > -1) or (curpix < self.BACKGROUND and color == -1): + if (curpix == color and color > -1) or (curpix < self.BACKGROUND and color == -1): if curpix > self.BLACKCOLOR: result = 1 if curpix <= self.BLACKCOLOR: |