Handling Links : https://www.cnblogs.com/tk091/p/4331327.html
Import PIL from PIL Import ImageFont from PIL Import Image from PIL Import ImageDraw # set the font, if not, you can not set the font = ImageFont.truetype ( " /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf " , 13 ) # open negatives picture imageFile = " base.png " IM1 = Image.open (imageFile) # add text on picture 1 Draw = ImageDraw.Draw (IM1) draw.text ((0, 0), " 1 " , (255,255,0), font = font) Draw= ImageDraw.Draw(im1) # 保存 im1.save("target.png")