[reportlab-users] Binary image data in Table
dimitri pater
dimitri.pater at gmail.com
Wed Jan 24 18:16:52 EST 2007
Thanks for the hint Robin, got it working now!
Dimitri
On 1/19/07, Robin Becker <robin at reportlab.com> wrote:
>
> dimitri pater wrote:
> > Hi all,
> > perhaps somewhere here can help me...
> > The reportlab userguide (page 75) describes how to insert an image (from
> > disk) into a table. But I would like to know how to insert an image from
> a
> > MySQL blob field (small thubnails 3Kb) into a table. Is this possible?
> Any
> > ideas?
>
> If you're using the Image flowable then yes. You can copy the data into a
> StringIO object. And then reset it.
>
> you need to do something like
>
> from StringIO import StringIO
> x = StringIO(data)
> x.seek(0)
>
>
> x now looks like a python file object so you can pass it directly to Image
> instead of a file name.
> --
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://two.pairlist.net/pipermail/reportlab-users/attachments/20070125/80166da8/attachment.html
More information about the reportlab-users
mailing list