compress-tool

πŸ—œοΈ Image Optimizer Pro

Stars Version Python License Platform

✨ A powerful desktop application for image compression, resizing, and format conversion ✨
Built with Python + tkinter πŸ”² featuring a sleek dark UI inspired by Google Material Design 🎨


🌟 Features

Feature Description Icon
πŸ—œοΈ Compress Reduce file size while maintaining quality Lossy compression
πŸ“ Resize Scale by dimensions or percentage with presets Smart scaling
πŸ”„ Convert Convert between JPEG, PNG, and WebP Format conversion
πŸ“š Batch Process multiple images at once Bulk processing
πŸ“± Responsive Generate multiple sizes for web/mobile Multi-size export
πŸ“₯ ZIP Export Download processed images as archive Easy sharing
🎨 Dark UI Modern Material Design interface Eye-friendly
πŸ“Š Progress Real-time progress tracking Visual feedback
🧹 Metadata Strip EXIF data from images Privacy focused

πŸš€ Demo / Preview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      πŸ’» APPLICATION UI                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  πŸ—œοΈ Image Optimizer Pro     Version 2.0.0    πŸ“ OptimizedImagesβ”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ πŸ—œοΈ Compress β”‚ πŸ“ Resize β”‚ πŸ”„ Convert β”‚ πŸ“š Batch β”‚ πŸ“±Responsiveβ”‚
β”‚  β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚
β”‚  β”‚                    β”‚                                     β”‚ β”‚
β”‚  β”‚   πŸ—œοΈ Compress     β”‚         πŸ“Έ Images (0 images)           β”‚ β”‚
β”‚  β”‚                    β”‚                                     β”‚ β”‚
β”‚  β”‚   Quality          β”‚    [πŸ“ Browse Files] [πŸ“ Browse]   β”‚ β”‚
β”‚  β”‚   ─────────        β”‚    [πŸ—‘οΈ Clear]     [πŸ“₯ Download ZIP]β”‚ β”‚
β”‚  β”‚   [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘] 85%  β”‚                                     β”‚ β”‚
β”‚  β”‚                    β”‚                                     β”‚ β”‚
β”‚  β”‚   ☐ Strip Metadata β”‚                                     β”‚ β”‚
β”‚  β”‚   β˜‘ Preserve Orig β”‚                                     β”‚ β”‚
β”‚  β”‚                    β”‚                                     β”‚ β”‚
β”‚  β”‚  [▢️ Compress Images]                                     β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚  Ready β€’ Add images to begin                    [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘] 45%   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“‹ Requirements

Requirement Version Description
🐍 Python 3.x Python interpreter
πŸ–ΌοΈ Pillow Latest Image processing library
πŸ–₯️ Windows 10/11 Operating system

πŸ“¦ Install Python & Dependencies

# Check Python version
python --version

# Install Pillow
pip install pillow

⚑ Quick Start

Step 1️⃣: Clone the Repository

git clone https://github.com/himeshajayaneth/compress-tool.git
cd compress-tool

Step 2️⃣: Install Dependencies

pip install pillow

Step 3️⃣: Run the Application

python image_optimizer.py

πŸ“– How to Use (Detailed)

πŸ• Getting Started Guide

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 🎯 STEP-BY-STEP GUIDE               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                         β”‚
β”‚  πŸ“₯ STEP 1: Add Images                                  β”‚
β”‚     β”œβ”€ Click "Browse Files" β†’ Select individual imagesβ”‚
β”‚     └─ Click "Browse Folder" β†’ Load all from a folder    β”‚
β”‚                                                         β”‚
β”‚  πŸ”§ STEP 2: Select Tool                               β”‚
β”‚     β”œβ”€ Compress     β†’ Reduce file size               β”‚
β”‚     β”œβ”€ Resize       β†’ Change dimensions              β”‚
β”‚     β”œβ”€ Convert      β†’ Change format                β”‚
β”‚     β”œβ”€ Batch       β†’ Process all at once         β”‚
β”‚     └─ Responsive  β†’ Generate multiple sizes    β”‚
β”‚                                                         β”‚
β”‚  βš™οΈ STEP 3: Configure Settings                       β”‚
β”‚     β”œβ”€ Quality slider (1-100%)                     β”‚
β”‚     β”œβ”€ Output format (JPEG/PNG/WebP)               β”‚
β”‚     └─ Dimensions or scale percentage               β”‚
β”‚                                                         β”‚
▢️ STEP 4: Process Images                              β”‚
β”‚     └─ Click the action button to start              β”‚
β”‚                                                         β”‚
β”‚  πŸ“€ STEP 5: Export                                  β”‚
β”‚     β”œβ”€ Download as ZIP archive                   β”‚
β”‚     └─ Open output folder                       β”‚
β”‚                                                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tools Overview

πŸ› οΈ Tool πŸ“ Description ⚑ Usage
πŸ—œοΈ Compress Reduce image file size Quality: 1-100%
πŸ“ Resize Change image dimensions Width/Height/Scale
πŸ”„ Convert Change image format JPEG β†’ PNG β†’ WebP
πŸ“š Batch Process multiple images Single click
πŸ“± Responsive Create multiple sizes Thumb to Full HD

πŸ“ Resize Presets

Preset Dimensions Use Case
πŸ–ΌοΈ Thumbnail 150Γ—150 Avatars, Icons
πŸ“± Small 320Γ—320 Mobile
πŸ“± Medium 768Γ—768 Tablets
πŸ’» Desktop 1280Γ—1024 Standard
πŸ“Ί HD 1920Γ—1080 Full HD

πŸ“± Responsive Sizes

Size Dimensions Use Case
πŸ–ΌοΈ Thumbnail 150px Mobile thumbnails
πŸ“± Mobile 320px Small phones
πŸ“± Tablet 768px iPads, Tablets
πŸ’» Desktop 1280px Laptops, Monitors
πŸ“Ί Full HD 1920px 4K displays

🎯 Supported Formats

πŸ“₯ Input Formats πŸ“€ Output Formats
JPEG (.jpg, .jpeg) JPEG (.jpg)
PNG (.png) PNG (.png)
WebP (.webp) WebP (.webp)
BMP (.bmp) Β 
GIF (.gif) Β 

πŸ’‘ Use Cases

Use Case Recommended Tool Settings
πŸ“Έ Photo Sharing Compress Quality: 80-85%
🌐 Web Images Responsive All sizes
πŸ“± Social Media Convert + Resize PNG, 1080px max
πŸ“§ Email Attachments Compress Quality: 60-70%
πŸ–ΌοΈ Print Resize High quality
πŸ“¦ Batch Archive Batch Quality: 85%

πŸ”§ Technical Details

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           πŸ“± APPLICATION LAYERS        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚      🎨 UI Layer (tkinter)        β”‚    β”‚
β”‚  β”‚   β€’ Headers, Toolbar, Panels    β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                    β”‚                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚    βš™οΈ Business Logic Layer        β”‚    β”‚
β”‚  β”‚   β€’ ImageOptimizerApp          β”‚    β”‚
β”‚  β”‚   β€’ Tool switching            β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                    β”‚                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚    πŸ–ΌοΈ Image Processing         β”‚    β”‚
β”‚  β”‚   β€’ Pillow (PIL)               β”‚    β”‚
β”‚  β”‚   β€’ Compress, Resize, Convert   β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

βš™οΈ Default Settings

Setting Default Description
πŸ–ΌοΈ Quality 85% Compression quality
πŸ“ Window Size 1200Γ—800 UI size
πŸ“ Min Size 1000Γ—700 Minimum window
πŸ“‚ Output OptimizedImages/ Output folder
🎨 Theme Dark UI theme

πŸ”‘ Key Functions

Function Description Parameters
compress_images() Compress with quality quality (1-100), strip_meta
resize_images() Resize by dimensions width, height, scale
convert_images() Convert format format, quality
batch_process() Batch operation quality
generate_responsive() Multi-size sizes list

🎨 Color Palette

Color Hex Usage
πŸ”΅ Primary BG #1a1a2e Main background
πŸ”· Secondary BG #16213e Cards, panels
πŸ’œ Accent #6366f1 Buttons, active
🟒 Success #10b981 Success actions
⚠️ Warning #f59e0b Warnings
❌ Danger #ef4444 Delete, clear

πŸ“‚ Output

πŸ“ Output Directory

~/Desktop/OptimizedImages/

πŸ“ File Naming Convention

Operation Output Filename Example
Compress {name}_optimized.jpg photo_optimized.jpg
Resize {name}_resized.jpg photo_resized.jpg
Convert {name}_converted.{fmt} photo_converted.png
Batch {name}_batch.jpg photo_batch.jpg
Responsive {name}_{size}.jpg photo_thumbnail.jpg

❓ FAQ (Frequently Asked Questions)

General Questions

Question Answer
❓ Is it free? Yes! MIT Licensed
❓ Is it safe? Yes! No data leaves your device
❓ Does it work offline? Yes! 100% offline
❓ What OS is supported? Windows 10/11
❓ Can I preserve originals? Yes! Check β€œPreserve Original”

Technical Questions

Question Answer
❓ Best quality for web? 80-85%
❓ Best for email? 60-70%
❓ Does it remove EXIF? Yes! Check β€œStrip Metadata”
❓ Format for transparency? Use PNG
❓ Format for web? Use WebP

πŸ”§ Troubleshooting

Common Issues

Issue Solution
🚫 Python not found Install Python 3.x
🚫 Pillow not installed pip install pillow
🚫 No images loaded Browse files first
🚫 Error opening file Check file permissions
🚫 Slow processing Reduce batch size

Installation Errors

# Error: pip not found
python -m pip install pillow

# Error: Permission denied
pip install pillow --user

# Update pip first
python -m pip install --upgrade pip

πŸ“Š Performance Tips

Tip Benefit
πŸ’Ύ Close other apps Faster processing
πŸ“ Use SSD Quick save times
🎯 Right quality Balance size/quality
πŸ“¦ Batch process Save time

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. 🍴 Fork the repository
  2. πŸ”§ Create your feature branch
  3. πŸ“ Commit your changes
  4. πŸ“€ Push to the branch
  5. πŸ”ƒ Create Pull Request

πŸ“œ License

License

MIT License
Copyright (c) 2024 Himesha Jayaneth

πŸ‘©β€πŸ’» Author

Himesha Jayaneth πŸ‘‹

GitHub Stars


πŸ™ Acknowledgments

Library Purpose Link
πŸ–ΌοΈ Pillow Image processing python-pillow.org
🐍 Python Programming language python.org
🎨 tkinter GUI framework Python stdlib

πŸ“ Changelog

v2.0.0 (Current)

v1.0.0


πŸ“¬ Contact


⭐ Don't forget to star this repository if you found it helpful! ⭐

Made with ❀️ by Himesha Jayaneth