1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw

font = ImageFont.truetype("arial.ttf", 36)

img = Image.open(imgpath)

draw = ImageDraw.Draw(imagebak)
text = "result"
draw.text((50,50),text,font=font)

savepath = "D:\\user\\Projects\\Efficientnet\\efficientNet\\data\\dst.bmp"

imagebak.save(savepath)