aboutsummaryrefslogtreecommitdiffstats
path: root/jm2l/captcha.py
diff options
context:
space:
mode:
Diffstat (limited to 'jm2l/captcha.py')
-rw-r--r--jm2l/captcha.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/jm2l/captcha.py b/jm2l/captcha.py
index bebc8bb..192e51b 100644
--- a/jm2l/captcha.py
+++ b/jm2l/captcha.py
@@ -48,8 +48,8 @@ class _PyCaptcha_WarpBase(object):
def render(self, image):
r = self.resolution
- xPoints = image.size[0] / r + 2
- yPoints = image.size[1] / r + 2
+ xPoints = image.size[0] // r + 2
+ yPoints = image.size[1] // r + 2
f = self.get_transform(image)
# Create a list of arrays with transformed points
@@ -124,7 +124,7 @@ def DoCaptcha(request):
# Choose a word for captcha
text = random.choice(TabMots)
Xt, Yt = font.getsize(text)
- OrX, OrY = (ImgSize[0]-Xt)/2, (ImgSize[1]-Yt)/2
+ OrX, OrY = (ImgSize[0]-Xt)//2, (ImgSize[1]-Yt)//2
draw.text((OrX, OrY), text, font=font, fill="#000000")
# Apply a Blur
# WorkImg=WorkImg.filter(ImageFilter.BLUR)