Coder Social home page Coder Social logo

imagesqueezer's Introduction

Image Squeezer

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.

Features

  • 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.

Requirements

  • Python 3.x
  • tkinter
  • Pillow (PIL)

Installation

  1. Clone the repository:

    git clone https://github.com/skr2270/ImageSqueezer.git
    cd ImageSqueezer
  2. Create and activate a virtual environment (optional but recommended):

    python -m venv .venv
    source .venv/bin/activate  # On Windows use: .venv\Scripts\activate
  3. Install the required packages:

    pip install -r requirements.txt

Usage

  1. Run the application:

    python main.py
  2. 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.
  3. Check the console output:

    • Successful compressions and any errors encountered will be printed to the console.

Error Handling

  • 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.

Building an Executable

To create an executable file for the application:

  1. Install PyInstaller:

    pip install pyinstaller
  2. Build the executable:

    pyinstaller --onefile --noconsole --name ImageSqueeze main.py
  3. Locate the executable:

    • The executable will be created in the dist directory and will be named ImageSqueeze.exe.

Collaboration

We welcome contributions from the community! If you would like to contribute to this project, please follow these steps:

  1. Fork the repository on GitHub.
  2. Create a new branch for your feature or bug fix:
    git checkout -b feature-name
  3. Commit your changes with a descriptive commit message:
    git commit -m "Add feature-name"
  4. Push your branch to your forked repository:
    git push origin feature-name
  5. Create a pull request against the main repository's master branch.

We look forward to your contributions!

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

imagesqueezer's People

Contributors

skr2270 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.