[Zope] Create image with PIL in Zope

John Ziniti jziniti at speakeasy.org
Fri Oct 1 10:30:48 EDT 2004


Bruno Miguel Silva wrote:
>    When i use the "ImageFont.load('pathToFont.pil')", that causes an
> Error Type: IOError
> Error Value: cannot find glyph data file
>    i don' understand, because i have the ".pbm", and it works in command line.

I have problems with using PIL under Zope as Zope has a
module called Image, and PIL has a module called Image,
and the Zope one is the one that gets imported instead
of the PIL one when running under Zope (but not when
running on the command line).

I end up munging my PIL installation, so that modules
that have:

import Image, ImageFile

get changed to read instead:

from PIL import Image, ImageFile

This usually works for me.  I usually only have to munge
the few "plugin" modules for the types of images I am
creating, like "JpegImagPlugin.py" and "PngImagePlugin.py".

You may have to munge other modules.

HTH,

John Z




More information about the Zope mailing list