def add_num_to_img(img):
draw=ImageDraw.ImageDraw(img)
myFont=ImageFont.truetype('C:/windows/fonts/Arial.ttf', size=40)
fillcolor='#ff0000'
width,height=img.size
draw.text((width-40,0),'99',font=myFont,fill=fillcolor)
img.save('result.jpg','jpeg')
return 0
评论列表
文章目录