生成验证码
利用python自动生成验证码
生成过程
#encoding=utf-8
import random
# import matplotlib.pyplot as plt
import string
import sys
import math
from PIL import Image,ImageDraw,ImageFont,ImageFilter
filename="C:/Users/123/Desktop/yzm/"
#字体的位置,不同版本的系统会有不同BuxtonSketch.ttf
font_path = 'C:/Windows/Fonts/Georgia.ttf'
#font_path = 'C:/Windows/Fonts/默陌肥圆手写体.ttf'
#生成几位数的验证码
number = 4
#生成验证码图片的高度和宽度
size = (129,53)
#背景颜色,默认为白色
bgcolor = (255,255,255)
#字体颜色&#x