[IMAGE-SIG] Text in Image?

Dirk Engelmann Dirk.Engelmann@iwr.uni-heidelberg.de
Tue, 14 Oct 1997 15:04:21 +0200 (MET DST)


First, I would like to know, if there is a image-format were I can
put a comment or note into the image (not into the grafics).

Second, I've got problems with putting text into an image.

The font conversion to pil was correctly working.

If I have a something like this:

import Image
import ImageDraw

im = Image.open("testimage.ppm")
draw = ImageDraw.ImageDraw(im)
draw.text((20,20), "text")

I get an error message:

    draw.text((20,20), "text")
line 68, in text
    m = self.font.getmask(text)
line 84, in getmask
SystemError: NULL result without error in call_object

I looked into ImageFont and ImageDraw module, but it wasn't quite clear to
me what went wrong - or if it's my fault.

Thanks for help!


Dirk Engelmann

IMAGE-SIG - SIG on Image Processing with Python

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