By Winsome Designs Automation Tools
This Python script provides a simple GUI application to convert PNG images to JPG format. It allows users to select a folder containing PNG images, specify the output folder for the converted JPG images, and adjust the quality and dimensions of the converted images. The application is built using the Tkinter library for the graphical interface, and the PIL (Python Imaging Library) is used to handle image processing tasks.
Python: Make sure you have Python installed on your system. You can download Python from the official website: https://www.python.org/downloads/
The script requires the following Python libraries, which can be installed using pip:
- tkinter: Provides the GUI framework for the application.
- ttkthemes: Offers themed styling for tkinter widgets.
- Pillow (PIL): Used for image processing tasks.
To install the required libraries, open a terminal or command prompt and run the following commands:
pip install Pillow
pip install tkinter
pip install ttkthemes
- Save the provided code in a Python file, e.g., png2jpg_converter.py.
- Open a terminal or command prompt and navigate to the folder containing the Python file. Run the script using the following command:
python png2jpg_converter.py
-
Select Input and Output Folders:
- Click on the "Browse" button next to "PNG Folder" and select the folder containing the PNG images you want to convert.
- If you want to specify a separate folder for the converted JPG images, click on the "Browse" button next to "JPG Folder" and select the output folder. (If not provided, a "jpg_folder" will be created inside the PNG folder to save the converted images.)
-
Set Quality and Dimensions:
- Enter the desired quality for the converted JPG images in the "JPG Quality (1-100)" field. (The value must be an integer between 1 and 100.)
- Specify the width and height of the converted images in the "Width" and "Height" fields, respectively. (The dimensions should be in pixels.)
-
Start the Conversion:
- Click on the "Start Conversion" button to begin the conversion process.
The status bar will display messages indicating the progress and completion of the conversion.
GitHub Repository: GitHub Repo
Instgram: Instgram
Pinterest: Pinterest
Zazzle Store: Zazzle Store
Teepublic Store: Teepublic Store
Happy converting and enjoy the automation!
Created by Winsome Designs Automation © 2023