0

Hi All'
How can I embed images (.png, .gif, etc) into a single py file and call them in program
I saw them in wxpy demo but how exactly to embedd them??

Appreciation,
Steve

2
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by Stefano Mtangoo
0

how do you conert them to that form?
I mean from something.png to "zyYsabskalUYDTbsnsmjahaHSGYDKD" representing that image

I find it puzzling

0

This was how vega did it:

import base64
jpgfile = "halloween3.jpg"
jpg_text = base64.encodestring(open(jpgfile,"rb").read())
print jpg_text

Hope that helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.