[reportlab-users] drawImage function with file pointer

John Keubler jtkeubler at yahoo.com
Thu Feb 2 02:32:02 EST 2006


The following code does not work with a file pointer however if I hard code the file name into the function it does work.  Can anybody help me?  I need it to work with a file pointer because I am going to use the urlopen function and use it as a memory stream object.  I don't want to save files to my hard drive.  I want to do it all in memory.
   
  # this does not work
  f = file("c:/tmpf.img", "rb")
  a = c.drawImage(f, 3*inch, 3*inch, width=1*inch, height=1*inch, mask=None)
print a
   
    # this does work
  a = c.drawImage("c:/tmpf.img", 3*inch, 3*inch, width=1*inch, height=1*inch, mask=None)
print a
   


		
---------------------------------
Do you Yahoo!?
 With a free 1 GB, there's more in store with Yahoo! Mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://two.pairlist.net/pipermail/reportlab-users/attachments/20060201/046f5ac1/attachment.html


More information about the reportlab-users mailing list