[IMAGE-SIG] ImageFont problems

Fredrik Lundh fredrik@pythonware.com
Fri, 20 Mar 1998 09:16:51 +0100

(caught by the spam filter /F)

Date: Thu, 19 Mar 1998 20:21:41 -0500 (EST)
From: cgw@pgt.com (Charles G Waldman)
Message-Id: <199803200121.UAA22846@reactor.pgt.com>
To: image-sig@python.org
Subject: Help with ImageFont

I have Imaging-0.3a4 and pilfont-970826

I'm not sure where ".pil" fonts are supposed to come from;  I ran
"pilfont.py /usr/X11R6/lib/X11/fonts/75dpi/lutRS12.pcf"
which produced for me the file "lutRS12.pil".  So far so good.  (I'm
proceeding by guesswork, since I can't find docs for ImageFont 

Now, I do

>>> import Image, ImageFont
>>> x = ImageFont.load("lutRS12.pil")
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "ImageFont.py", line 105, in load
  File "ImageFont.py", line 76, in _load_pilfont
    self.image = Image.open(os.path.splitext(filename)[0] + ".pbm")
  File "/usr/local/lib/python1.5/Imaging/Image.py", line 736, in open
    fp = __builtin__.open(fp, "rb")
IOError: (2, 'No such file or directory')

Apparently, it's not the ".pil" file it's having trouble finding
but some ".pbm" file.  Where is this supposed to be coming from? 
What am I doing wrong?


IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org