HELP with PIL and grainy text
Huuuze
bryanandedna at gmail.com
Sun Aug 3 07:56:07 EDT 2008
I could really use some help. Please take a look at the following
image:
http://img227.imageshack.us/img227/1346/grainynn3.png
As you can see, the text in the image is fairly grainy. To get to
that point, I converted an ArialBold TTF to a BDF using otf2bdf
(http://crl.nmsu.edu/~mleisher/ttf2bdf.html) and then I used pilfont
utility (http://www.pythonware.com/library/pil/handbook/pilfont.htm)
to convert the file into a .PIL and .PBM file. I'd expect the font to
be smooth, but no such luck.
Any idea what could be happening here?
For what it's worth, I'm using a Mac (OSX 10.5.4). Here is the PIL
code as well:
>> import Image, ImageDraw, ImageFont
>> font = ImageFont.load("Arial.pil")
>> im = Image.open("../images/image.png")
>> dr = ImageDraw.Draw(im)
>> dr.text((79,34), "Successfully used the Python Image Library", font=font)
>> im.save("../images/grainy.png", "PNG")
More information about the Python-list
mailing list