#!python # -*- mode: python; Encoding: utf-8; coding: utf-8 -*- # Last updated: <2019/11/03 10:34:17 +0900> """ Draw for Pillow ImageDraw. Windows10 x64 + Python 3.7.5 32bit + Pillow 6.2.1 """ from PIL import Image, ImageDraw, ImageFont im = Image.new('RGB', (512, 512), (255, 255, 255)) d = ImageDraw.Draw(im) fnt = ImageFont.truetype("./arial.ttf", 32) d.text((32, 64), "use ImageDraw", font=fnt, fill=(0, 0, 0)) d.text((32, 96), "use ImageDraw", font=fnt, fill=(128, 128, 128)) im.show() # im.save("./output_imagedrawtext.png")