[Image-SIG] Bad antialias? (in Python Imaging Library 1.1.5)
Laszlo Zsolt Nagy
gandalf at designaproduct.biz
Mon Sep 19 10:42:20 CEST 2005
I create a fully transparent red image this way:
size = (400,400)
img = Image.new('RGBA',size,(255,0,0,0))
Then I draw an (antialiased) text on it:
drawer = ImageDraw.Draw(img)
font = ImageFont.truetype('arc.ttf',12)
drawer.text((0,0),"This text is 12pt",font=font,fill=(0,0,0,255))
This is what I get (image drawn on a gray background):
http://mess.hu/download/bad_antialias.png
Apparently, antialiasing will use a mixture of the background color and
the text color on the edges.
I think this is good only if the background is fully opaque. Is there a
workaround?
Is this a PIL bug or a feature?
Thanks,
Les
More information about the Image-SIG
mailing list