[Image-SIG] Images in Zope/ReportLab

Heiner de Wendt H.dewendt@systec.de
Wed, 9 May 2001 11:24:21 +0200


Hi,

> looks like you're a bit too optimistic: ReportLab's drawInlineImage
> method expects a *filename* or a PIL Image object, not a string
> containing "<img src='...'>"...

I already thought so ;)  I got to this code after various suggestions 
by other people, seems some of those suggestions weren't *that* good.

But, when I do something like that:

c.drawInlineImage(self.image1,50,500,width=100,height=180)

I get an "Attribute Error: Convert".

When I try putting it in quotation marks ('self.image1' or just 
'image1') he says something like "File or Directory not found"; when 
I just use (image1,50...), I get a Name Error (I guess it's quite 
the same as the 'not found' one..).

> (or use PIL.Image.open(filename) to create a PIL object, and pass
> that one to drawInlineImage)

How do I do that? I tried this:

obj=PIL.Image.open(self.image1)

and got the error message

Error Type: AttributeError
Error Value: read

Thanks for any further help,

Heiner