from PIL import Image, ImageFont, ImageDraw, ImageFilterfrom random import choice, randint # 随即配置颜色def rand_color(): return (randint(128, 255), randint(128, 255), randint(128, 255)) # 创建图片# img = Image.new(格式,大小,颜色)img = Image.new('RGB', (200, 50), '…