Image Squeezer is a simple Python application that allows users to compress images while maintaining quality. It supports multiple image formats and provides a user-friendly interface for uploading, compressing, and downloading images.
- Select multiple images for compression
- Supports multiple image formats: JPEG, PNG, BMP, GIF, TIFF.
- Displays thumbnails of selected images
- Handles EXIF data to correct image orientation.
- Provides detailed error messages for unsupported formats, corrupted files, size/memory issues, and EXIF data issues.
- User-friendly interface with drag-and-drop support and compression level adjustment.
- Real-time progress updates for image uploading and compression
- Saves compressed images in a new "compressed" directory within the original image directory.
- Python 3.x
- tkinter
- Pillow (PIL)
-
Clone the repository:
git clone https://github.com/skr2270/ImageSqueezer.git cd ImageSqueezer
-
Create and activate a virtual environment (optional but recommended):
python -m venv .venv source .venv/bin/activate # On Windows use: .venv\Scripts\activate
-
Install the required packages:
pip install -r requirements.txt
-
Run the application:
python main.py
-
Use the interface:
- Click "Upload Image" to select images for compression.
- Adjust the compression level using the slider.
- Click "Download Compressed Images" to compress and save the images.
-
Check the console output:
- Successful compressions and any errors encountered will be printed to the console.
- Unsupported Formats / Corrupted Files: The application will raise an alert and log the error.
- Size / Memory Issues: The application will raise an alert if there is an issue related to the size or memory while compressing.
- EXIF Data Issues: The application will log any issues related to EXIF data but will attempt to compress the image.
To create an executable file for the application:
-
Install PyInstaller:
pip install pyinstaller
-
Build the executable:
pyinstaller --onefile --noconsole --name ImageSqueeze main.py
-
Locate the executable:
- The executable will be created in the
dist
directory and will be namedImageSqueeze.exe
.
- The executable will be created in the
We welcome contributions from the community! If you would like to contribute to this project, please follow these steps:
- Fork the repository on GitHub.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Commit your changes with a descriptive commit message:
git commit -m "Add feature-name"
- Push your branch to your forked repository:
git push origin feature-name
- Create a pull request against the main repository's
master
branch.
We look forward to your contributions!
This project is licensed under the MIT License. See the LICENSE file for details.
- Pillow for image processing.
- tkinter for the GUI.
- PyInstaller for creating the executable.