def gen_specil_img(text, file_path, width, height):
# 生成img文件
generator = ImageCaptcha(width=width, height=height) # 指定大小
img = generator.generate_image(text) # 生成图片
img.save(file_path)
captcha生成验证码图片
Scroll Down© 本文著作权归作者所有,转载前请务必署名