/Image-Tool

This tool is a web-based image editor built with Streamlit, offering features like resizing, cropping, format conversion, and image enhancements with real-time previews, all within a simple and intuitive interface. Contributed to: https://github.com/UTSAVS26/PyVerse/tree/main/Automation_Tools/Image-Tool

Primary LanguagePython

Image Manipulation Tool

This Python-based Image tool, built using Streamlit, allows users to perform various image manipulation tasks such as resizing, cropping, format conversion, background removal, and enhancement. With an intuitive, web-based interface, users can make adjustments with real-time previews. This tool is designed for single-image processing, providing a simple yet powerful platform for common image editing tasks.

Approach:

  • The project started with research into image manipulation using Python libraries like Pillow and Streamlit.
  • Tools like streamlit-cropper were integrated for easier cropping.

Additional Resources:

EXPLANATION

DETAILS OF THE DIFFERENT FEATURES

  1. Image Resizing: Users can resize images by height, width, or percentage.
  2. Image Cropping: Provides an interactive cropping tool using streamlit-cropper with aspect ratio control.
  3. Format Conversion: Converts images to popular formats like JPEG, PNG, BMP, and GIF.
  4. Enhancement: Adjust brightness, contrast, sharpness, and color.
  5. Bulk Background Remover: Takes bulk images and removes their background.

WHAT I HAVE DONE

  1. Researched tools like Streamlit and Pillow for image manipulation.
  2. Developed a basic interface using Streamlit for uploading and previewing images.
  3. Integrated resizing functionality with live previews.
  4. Added image cropping using streamlit-cropper.
  5. Implemented format conversion with compression quality controls.
  6. Enabled image enhancement options (brightness, contrast, sharpness, color).
  7. Ensured images can be saved and downloaded after edits.
  8. Enabled bulk background remover with zip download all images option.

PROJECT TRADE-OFFS AND SOLUTIONS

  1. Trade-off 1: Keeping the interface simple vs. adding advanced features.
    • Solution: Prioritized simplicity, only adding essential features like resizing, cropping, and enhancement.
  2. Trade-off 2: Balancing performance with real-time previews.
    • Solution: Implemented lightweight image previews using Pillow and optimized backend logic.

LIBRARIES NEEDED

  • streamlit
  • Pillow
  • rembg
  • opencv-python-headless
  • numpy
  • streamlit-cropper

SCREENSHOTS

image image image image image image

CONCLUSION

WHAT YOU HAVE LEARNED

  • Practical application of Python in image processing.
  • Using Streamlit to create web-based applications.
  • Using Pillow's Image to modify and handle images.
  • Importance of balancing simplicity with functionality in a user interface.

USE CASES OF THIS MODEL

  1. Content Creators: Resize and enhance images for social media or blogs.
  2. Web Developers: Optimize image sizes for website performance.

Installation

  1. Clone the Repository:

    git clone https://github.com/Himanshi-m/Image-Tool.git
    cd Image-Tool
  2. Set up a virtual environment (optional but recommended):

    python -m venv env
    source env/bin/activate  # On Windows use `env\Scripts\activate`
  3. Install Dependencies: Install the required dependencies using the provided requirements.txt:

    pip install -r requirements.txt
  4. Run the Application: Once dependencies are installed, run the tool with:

    streamlit run Image_Tool.py

Made by

Himanshi Maheshwari

LinkedIn GitHub Discord

Happy Coding 🧑‍💻

Show some  ❤️  by  🌟  this repository!