Spaces:
Sleeping
Sleeping
File size: 383 Bytes
6f53933 2f51475 6f53933 2f51475 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from PIL import Image, ImageDraw, ImageFont
def create_meme(image, text):
img = image.convert("RGB")
draw = ImageDraw.Draw(img)
print('escribiendo texto')
try:
font = ImageFont.truetype("arial.ttf", 40)
except:
font = ImageFont.load_default()
#Añadir texto arriba
draw.text((20, 20), text, font=font, fill="white")
return draw#img
|