By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,822 Members | 1,053 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,822 IT Pros & Developers. It's quick & easy.

HELP with PIL and grainy text

P: n/a
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/pi...ok/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")

Aug 3 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.