9 lines
274 B
Python
9 lines
274 B
Python
from PIL import Image, ImageDraw, ImageFont
|
|
|
|
def reddit(img, title):
|
|
i = Image.open(img)
|
|
d = ImageDraw.Draw(i)
|
|
d.text((28, 36), title, fill=(255, 0, 0))
|
|
# fnt = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
|
|
i.save(fp=i+'.png')
|
|
return True |