[IMAGE-SIG] broken ImageFont

Daniel Michelson Daniel.Michelson@smhi.se
Thu, 14 Aug 1997 13:16:30 +0200


Hej,

I got pretty far but:

import Image, ImageDraw, ImageFont

test =3D "This is a test."

this =3D Image.new("1", (512, 512))
font =3D ImageFont.load("courBO18.pil")
draw =3D ImageDraw.ImageDraw(this)
draw.setfont(font)
draw.setink(0)
draw.text((0,0), test)
Traceback (innermost last):
  File "text.py", line 10, in ?
    draw.text((0,0), teststring)
  File "...Imaging/Lib/ImageDraw.py", line 68, in text
    m =3D self.font.getmask(text)
  File "...Imaging/Lib/ImageFont.py", line 84, in getmask
    im.im.paste(self.image.im.crop(tuple(m[6:10])),
SystemError: NULL result without error in call_object

What next?

best, -d

+------------------+--------------------------------------------------+
|                  | Daniel B. Michelson                              |
| /\ |\  /| |  | | | Swedish Meteorological and Hydrological Institute|
| \  | \/ | |__| | | S-601 76 Norrk=F6ping, Sweden                      |=

|  \ |    | |  | | | Telephone: +46 11 - 15 84 94                     |
| \/ |    | |  | | | Telefax:   +46 11 - 17 02 07                     |
|                  | Internet:  Daniel.Michelson@smhi.se              |
+------------------+--------------------------------------------------+

_______________
IMAGE-SIG - SIG on Image Processing with Python

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