
# https://www.globalsino.com/ICs/
# All the font is at: C:\Windows\Fonts
# Add Text to an image

from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw

img = Image.open(r"C:\GlobalSino2\ICs\images\4500k_theRed.png")
myImage = ImageDraw.Draw(img)

# (URL > font file, font size)
font = ImageFont.truetype(r'C:\Windows\Fonts\ITCBLKAD.TTF',30)

myImage.text((150, 150), "Yougui", font = font, fill=(0, 250, 0))
img.save(r"C:\GlobalSino2\ICs\images\4500k_theRed_withText.png")
