You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
492 B
Python

from PIL import Image, ImageDraw, ImageFont
import sys
address = "".join(sys.stdin.readlines())
img = Image.new('RGB', (696, 220), color = (255, 255, 255))
fnt0 = ImageFont.truetype('fonts/OpenSans-Regular.ttf', 24)
fnt = ImageFont.truetype('fonts/OpenSans-Regular.ttf', 54)
d = ImageDraw.Draw(img)
d.text((20,5), "Netz39 e.V., Leibnizstr. 32, 39104 Magdeburg", font=fnt0, fill=(0,0,0))
d.text((20,25), address.strip('\"'), font=fnt, fill=(0, 0, 0))
img.save('address-label.png')