HELP with PIL and grainy text

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Huuuze

    HELP with PIL and grainy text

    I could really use some help. Please take a look at the following
    image:



    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 ), "Successful ly used the Python Image Library", font=font)
    >im.save("../images/grainy.png", "PNG")

Working...