Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit 2e7f197

Browse files
authored
Fix filename bug.
1 parent e0707cf commit 2e7f197

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: captcha_gen.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ def generate(GENNUM, SAVEPATH, ENGP=25, FIVEP=0, ENGNOLIMIT=False, filename="tra
101101
newtext.draw(image=captcha)
102102
offset = newtext.next_offset
103103
captchastr += str(newtext.letter)
104-
letterlist.append([str(index), captchastr])
105-
lenlist.append([str(index), captchalen])
104+
letterlist.append([str(index).zfill(len(str(GENNUM))), captchastr])
105+
lenlist.append([str(index).zfill(len(str(GENNUM))), captchalen])
106106
for obj in rectlist:
107107
obj.draw(image=captcha, overlay=True)
108108
captcha.convert("RGB").save(SAVEPATH + str(index).zfill(len(str(GENNUM))) + ".jpg", "JPEG")

0 commit comments

Comments
 (0)