Demo entry 2335931

sdfdf

   

Submitted by anonymous on Aug 03, 2015 at 18:33
Language: Python. Code size: 307 Bytes.

# -*- coding: utf-8 -*-
from PIL import Image, ImageDraw, ImageFont

img = Image.new('L', (500,500), 255)
draw = ImageDraw.Draw(img)
text_to_draw = unicode('Hallo welt','utf-8')
font = ImageFont.truetype('consola.ttf',24)
draw.text((2,2), text_to_draw, font = font)
del draw

img.save('image.png')

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).