Web Analytics Made Easy - Statcounter
Skip to content

psgresizer

Convert Between Image Formats, Resize and Base64 Encode Images

psgresizer

Installation

python -m pip install psgresizer

or

python3 -m pip install psgresizer

GitHub Repo Location

https://github.com/PySimpleGUI/psgresizer

Launching

From the command line:

psgresizer

You can also use the psgshortcut utility to make a double-clickable shortcut icon for Windows that can also be pinned to the Taskbar.

"Authored in, but not limited to PySimpleGUI"

Like many of the utilities that have been released as part of the PySimpleGUI project, they were developed using PySimpleGUI, but their use is not limited to PySimpleGUI-based project. psgresizer is a good example of this. You're using PySimpleGUI while running the code to process the images, but the application you use those images in doesn't have to use PySimpleGUI.

How to Use - Basic Convert and Resize

Use psgresizer to work with your image files. While PySimpleGUI was used to create this tool, its use is not limited to PySimpleGUI projects. Images can be converted, resized and saved to hard disk for use in other programs.

You can convert between these image formats: PNG, JPG, BMP, ICO, GIF, TIF

Note that PySimpleGUI is limited to using PNG and GIF images for use in layouts. Window icons depend upon the OS being used (see PySimpleGUI documentation for more information in icon use)

If you wish to convert your image to a new format, use the Combo shown in the "Convert to New Format" frame. If it is blank, then the output will use the same format as your input image

How to Use - Base64 Encoding

PySimpleGUI enables you to use Base64 encoded images extensively. Many times you will not need to distribute images with your application. You can simply convert them to Base64 and include them with your source code.

To facilitate easy conversion, psgresizer has an option to encode the resulting image and leave the encoded string on the clipboard so that you can easily past the result into your code.

If you only want to perform the Base64 conversion and do not wish to save a file to your hard drive, there is an option "Do not save file".