GenImg

A little script to generate images with numbers from 0 to 119. Inspired by https://code-maven.com/create-images-with-python-pil-pillow

from PIL import Image, ImageDraw, ImageFont
import matplotlib.pyplot as plt

fnt = ImageFont.truetype('/Windows/Fonts/Arial.ttf', 200)

for num in range(120):
    img = Image.new('RGB', (1000, 300), color = (73, 109, 137))
    d = ImageDraw.Draw(img)
    d.text((450,40), str(num), font=fnt, fill=(255,255,0))

    img.save('text'+str(num)+'.png') # save img
    #plt.imshow(img) # show img