[reportlab-users] Image from MySQL table and drawImage

dimitri pater dimitri.pater at gmail.com
Thu Sep 6 08:30:17 EDT 2007



> I saw that you switched to using an intermediate file; can drawImage not take an

> ImageReader instance? If not it's a buglet and should be fixed.

But, maybe it's just me... Here is what I did with regard to ImageReader:
cgebouw = StringIO()
cgebouw.write(vb1[0][3].tostring())
print cgebouw returns: <StringIO.StringIO instance at 0x019EEE18>
c.drawImage(ImageReader(cgebouw), 35*mm, PAGE_HEIGHT-220*mm,
width=None, height=None, mask=None)
raises this error:
File "C:\Python24\lib\site-packages\reportlab\lib\utils.py", line 537,
in __init__
a = str(ev.args[-1])+(' fileName='+fileName)
TypeError: cannot concatenate 'str' and 'instance' objects


> The problem with

> using intermediates (at least on windows is knowing when to delete them).

I have tried os.remove("temp.jpg") on several points in the code,
haven't found the right one yet

> --

> Robin Becker

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users

>



--
---
You can't have everything. Where would you put it? -- Steven Wright
---
please visit www.serpia.org


More information about the reportlab-users mailing list