immer wenn ich versuche mit PIL einem Bild einen Schriftzug hinzuzufügen bekomme ich einen Fehler :
Code :
Code: Alles auswählen
import Image, ImageDraw, ImageFont
o = open("test.gif", "w")
font = ImageFont.truetype('arial.ttf', 25)
o.text((10, 10), "hello", font=font)
o.save('test.gif')
Gruß Hanman[/quote][/code]Traceback (most recent call last):
File "C:\Dokumente und Einstellungen\hanman\Eigene Dateien\python\mrsexy\test.py", line 7, in -toplevel-
o.text((10, 10), "hello", font=font)
AttributeError: 'file' object has no attribute 'text'