Efficient Python tool for batch image conversion (.png, .jpg, .ico, .webp, .heic), with easy access via context menu.
- Convert a single image or batch of images to formats such as
PNG
,JPEG
,WEBP
,HEIC
, andICO
. - Automatically handles naming conflicts and ensures unique file names.
- Provides error handling with message boxes for common issues.
- GUI notifications for success or failure.
- Python 3.x
Pillow
library (for image processing)Tkinter
library (for GUI notifications)
To install the required dependencies:
pip install pillow tk
You can run the script from the command line with the following syntax:
python main.py <input_path_or_dir> <output_format>
Where:
<input_path_or_dir>
is the path to either a single image or a directory containing images you want to convert.<output_format>
is the desired image format (e.g.,png
,jpeg
,webp
,heic
,ico
).
To convert a single image to PNG:
python main.py "C:/images/sample.jpg" png
To convert all images in a folder to PNG:
python main.py "C:/images/" png
To create an executable (.exe
) version of the program without a console window, follow these steps:
-
Install PyInstaller: If you don't have
PyInstaller
, install it using pip:pip install pyinstaller
-
Build the executable: In the directory where
main.py
is located, run the following command:pyinstaller --noconsole --onefile main.py
This will generate a single
.exe
file inside thedist
folder.
-
Move the executable: Move the compiled
.exe
file from thedist
folder toC:/ImageConverter/
. -
Add the icon: Place an
icon.ico
file inside theC:/ImageConverter/
folder. This will be used as the program's icon. -
Renaming: Rename the compiled
main.exe
file toImageConverter.exe
for clarity and easy access. -
Running the Program: Now, you can double-click the
add-context-menu.reg
file to add it to context menu for easy access.
- E-mail: [email protected].
- VexSystems GitHub: github.com/vexsystems.
- VexSystems Instagram: @vex.systems.