[reportlab-users] What's wrong with this ?

p. bear reportlab-users@reportlab.com
25 Feb 2004 13:07:22 -0500


Philippe shrom:

> I found the problem.
> 
> The API changed between 1.1.8 and 1.1.9.
> drawImage only accept a filename or an ImageReader object in 1.1.9 ( a
> filename or a PIL Image object in 1.1.8).
> 
> The problem is that ImageReader only accept a filename. So we can no
> more use a PIL Image object.
> 

I have just run into the same problem.  

I happen to have all the images I use in an images file (generated by
img2py).  So I don't at this point have any image filenames.

On the offchance that I could just call the image.convert method, I
added it back in an AttributeError handler.  I get back some sort of
name from convert(), and rawdata is 17k+, but no luck actually drawing
the image.  As a side note, the rest of the canvas.drawImage method does
not seem to have changed.  

Is it worthwhile trying to patch drawImage() this way, or am I toast
(due to other changes elsewhere)?

python 2.3.3
Redhat 8/Windows 2000
ReportLab 1.1.9
PIL 1.1.4

ttfn

Ginny Keech
GSFC
-- 
"So long and thanks for all the fish."  D. Adams