[reportlab-users] load Image() from embedded python
Andy Robinson
andy at reportlab.com
Wed Jan 29 02:47:40 EST 2014
I think that everywhere we accept a filename, we also accept a
file-like object. So you could store it as some kind of escaped
binary string in your source code, then wrap it in a StringIO and pass
that to the platypus Image.
I'm not in a programming environment now but if this is not clear we
can post a code snippet later in the day...
- Andy
On 29 January 2014 00:50, Michael Hipp <michael at redmule.com> wrote:
> In the reportlab.platypus Image flowable, is it possible to load the image
> from an image embedded as binary in the python code? The only api for Image
> seems to depend on a filename.
>
> I'd prefer not to have to lug around things like logos and icons with my
> program.
>
> Thanks,
> Michael
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
--
Andy Robinson
Managing Director
ReportLab Europe Ltd.
Thornton House, Thornton Road, Wimbledon, London SW19 4NG, UK
Tel +44-20-8405-6420
More information about the reportlab-users
mailing list