PySimpleGUI / PySimpleGUI-Base64-Encoder

Convert your JPG, PNG, GIF and ICO files into Base64 strings for inclusion in your source code. Add icons, game graphics, etc, to your Python source code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PySimpleGUI Base64 Image Encoder

Convert An Entire Folder Of Images Into Python Code

Convert a folder full of these

image

Into a file full of these

image

Running

When you run the program you'll see this window.

image

You can either paste in the path to the folder of images or use the Browse button to locate the folder. Once entered, click OK and the images will be converted into Base64 strings which is written to a file named output.py

Why Do It?

If you're developing a GUI program, sometimes it easier to include all of your assets in the file with the source code itself. This will enable you to distribute your application by providing a single .py file instead of several files that may get separated. Distributing applications is still a challenge with Python. This technique makes the jobs a little bit easier.

It's particuarly good when creating PySimpleGUI programs. You can pass base64 images when creating Buttons and Images as well as specifying the program's icon.

Hungry for more PySimpleGUI applications?

If you want more examples like tthis one to help in creating your GUI, then be sure and check out the many programs found at http://Demos.PySimpleGUI.org.

logo500

About

Convert your JPG, PNG, GIF and ICO files into Base64 strings for inclusion in your source code. Add icons, game graphics, etc, to your Python source code.

License:GNU Lesser General Public License v3.0


Languages

Language:Python 100.0%