def add_num(img):
draw = ImageDraw.ImageDraw(img)
width, height=img.size
fontSize = min(width, height) // 10
fnt = ImageFont.truetype('Arial.tff', fontSize)
color = (255,0,0)
draw.text((0.9*width, 0.1*height), "1", fill=color, font=fnt)
img.save('avatar.jpg', 'jpeg')
return
评论列表
文章目录