Python 使用Pillow模块生成验证码

1.安装pip3 install pillow2.使用步骤生成验证码和验证字符串绘制图片,将验证码放入session中将图片返回给页面3.代码demo#!/usr/bin/env python3#_*_ coding:utf-8 _*_#Author:wdimport randomfrom PIL import Image, ImageDraw, ImageFont, ImageFilterdef

返回顶部