import io
import os

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

img = Image.new('RGB', (300, 28))
d = ImageDraw.Draw(img)
font = ImageFont.truetype('fonts/whitney.ttf', size=20)
d.text(font=font, xy=(4, 4), text='xz72', fill=(255, 255, 255))

img.save('test.png')
import io
import os

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

img = Image.new('RGB', (300, 28))
d = ImageDraw.Draw(img)
font = ImageFont.truetype('fonts/whitney.ttf', size=20)
d.text(font=font, xy=(4, 4), text='xz72', fill=(255, 255, 255))

img.save('test.png')