Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

验证码中的字符间距问题 #173

Open
ThomasSun001 opened this issue Dec 4, 2020 · 1 comment
Open

验证码中的字符间距问题 #173

ThomasSun001 opened this issue Dec 4, 2020 · 1 comment

Comments

@ThomasSun001
Copy link

请教一下,如果我想增加一下各个字符之间的间距,增加前
APU9Gk_16070664220426455
增加后
这样子的仅从距离来说:忽略内容
testing
是否有好的方案,调整过font_size的参数,或者字符之间添加几个空格,都不大满足需求

@bilibilipala
Copy link

image
修改一下image.py文件,里面的create_captcha_image函数,内容修改为我这个样子,就可以增加间距了
for c in chars:
if random.random() > 0.5:
images.append(_draw_character(" "))
else: # 修改 增加字体间距
images.append(_draw_character(" "))
images.append(_draw_character(c))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants