mirror of
https://github.com/lepture/captcha.git
synced 2026-03-13 09:43:22 +08:00
Merge pull request #31 from BigBorg/master
randomly add space between characters
This commit is contained in:
@@ -194,6 +194,8 @@ class ImageCaptcha(_Captcha):
|
||||
|
||||
images = []
|
||||
for c in chars:
|
||||
if random.random() > 0.5:
|
||||
images.append(_draw_character(" "))
|
||||
images.append(_draw_character(c))
|
||||
|
||||
text_width = sum([im.size[0] for im in images])
|
||||
|
||||
Reference in New Issue
Block a user