[reportlab-users] Troubles w/ ImageReader and PIL.Image

Peter Kropf pkropf at gmail.com
Mon Nov 20 18:37:29 EST 2006


Hi -

I'm trying to use ImageReader to put a logo in the footer section of a
page. The logo is currently stored in a database, not in the file
system. When I use PIL.Image as a parameter to ImageReader(), I get a
NameError: global name 'im' is not defined. It looks like ImageReader
is trying to get the actual filename of the file in

self.fileName = im.fileName

but is referencing the wrong object to do it. Should it be:

self.fileName = self._image.fileName

?

It also looks like this portion of the code isn't really tested much.
All the tests create a new ImageReader using a filename instead of a
PIL.Image object. Anyone else out there using ImageReader with
PIL.Image?

Thanks.

- Peter


More information about the reportlab-users mailing list