Re: load Image() from embedded python

Andy Robinson <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <CABjtApv3JRF9m1XQ9ErLKhfiPGA+n1+pdR_M=6R3xpb6KqXZ5A@mail.gmail.com>
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 <[email protected]> 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
> [email protected]
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.