This could be used for any image, but for the example we use this image that was created using Python:

A slightly generic script to write text in the top left corner: (Coordintates (0, 0))


from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
import sys

in_file, out_file, text = sys.argv[1:]

img =
draw = ImageDraw.Draw(img)
font = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 20)
draw.text((0, 0), text, (255, 255, 255), font=font)

The result looks like this: