A simple Python application that compresses images using the Pillow (PIL) library.
- Compresses images by reducing quality and resizing 📉
- Supports multiple image formats (JPEG, PNG, BMP, TIFF, WebP)
- Batch processes all images in the
inputfolder 📂 - Customizable compression settings ⚙️
- Shows compression statistics 📊
- Preserves image quality while reducing file size
- Install the required dependencies:
pip install -r requirements.txt
- Place your images in the
inputfolder. - Run the application:
python app.py
- Follow the prompts to customize compression settings (optional).
- Compressed images will be saved in the
outputfolder with the same file names.
- Quality: 85% (JPEG compression quality)
- Resize Factor: 0.8 (images resized to 80% of original dimensions)
- JPEG (.jpg, .jpeg)
- PNG (.png)
- BMP (.bmp)
- TIFF (.tiff, .tif)
- WebP (.webp)
- All compressed images are saved in the
outputfolder. - Output files have the same name as the input files, allowing for easy replacement.
- The application displays compression statistics for each image.
Original: photo.png (2.5 MB, 1920x1080)
Compressed: photo_compressed.jpg (450 KB, 1536x864)
Size reduction: 82%