mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-27 09:30:06 +00:00
Merge "captca.py: Fix PIL 10 support again"
This commit is contained in:
commit
ebb8f73ae3
|
@ -115,7 +115,12 @@ def gen_captcha(text, fontname, fontsize, file_name):
|
|||
font=font,
|
||||
fill=fgcolor,
|
||||
)
|
||||
offset += font.getsize(c)[0] - random.uniform(5, 6)
|
||||
if IMAGEFONT_HAS_GETBBOX:
|
||||
offset += font.getbbox(c)[2:][0]
|
||||
else:
|
||||
offset += font.getsize(c)[0]
|
||||
|
||||
offset -= random.uniform(5, 6)
|
||||
|
||||
for i in range(10):
|
||||
d.arc(
|
||||
|
|
Loading…
Reference in a new issue