14 lines
483 B
Python
14 lines
483 B
Python
|
from PIL import Image, ImageDraw, ImageFont
|
||
|
import sys
|
||
|
|
||
|
address = sys.stdin.readline()
|
||
|
|
||
|
img = Image.new('RGB', (696, 160), color = (255, 255, 255))
|
||
|
|
||
|
fnt0 = ImageFont.truetype('fonts/OpenSans-Regular.ttf', 14)
|
||
|
fnt = ImageFont.truetype('fonts/OpenSans-Regular.ttf', 32)
|
||
|
d = ImageDraw.Draw(img)
|
||
|
d.text((20,10), "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('pil_text_font.png')
|