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
andStreamlit
. - Tools like
streamlit-cropper
were integrated for easier cropping.
Additional Resources:
- Streamlit documentation https://streamlit.io/
- Pillow library documentation https://readthedocs.org/projects/pillow/
- Image Resizing: Users can resize images by height, width, or percentage.
- Image Cropping: Provides an interactive cropping tool using
streamlit-cropper
with aspect ratio control. - Format Conversion: Converts images to popular formats like JPEG, PNG, BMP, and GIF.
- Enhancement: Adjust brightness, contrast, sharpness, and color.
- Bulk Background Remover: Takes bulk images and removes their background.
- Researched tools like
Streamlit
andPillow
for image manipulation. - Developed a basic interface using
Streamlit
for uploading and previewing images. - Integrated resizing functionality with live previews.
- Added image cropping using
streamlit-cropper
. - Implemented format conversion with compression quality controls.
- Enabled image enhancement options (brightness, contrast, sharpness, color).
- Ensured images can be saved and downloaded after edits.
- Enabled bulk background remover with zip download all images option.
- Trade-off 1: Keeping the interface simple vs. adding advanced features.
- Solution: Prioritized simplicity, only adding essential features like resizing, cropping, and enhancement.
- Trade-off 2: Balancing performance with real-time previews.
- Solution: Implemented lightweight image previews using
Pillow
and optimized backend logic.
- Solution: Implemented lightweight image previews using
streamlit
Pillow
rembg
opencv-python-headless
numpy
streamlit-cropper
- Practical application of Python in image processing.
- Using
Streamlit
to create web-based applications. - Using
Pillow
'sImage
to modify and handle images. - Importance of balancing simplicity with functionality in a user interface.
- Content Creators: Resize and enhance images for social media or blogs.
- Web Developers: Optimize image sizes for website performance.
-
Clone the Repository:
git clone https://github.com/Himanshi-m/Image-Tool.git cd Image-Tool
-
Set up a virtual environment (optional but recommended):
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install Dependencies: Install the required dependencies using the provided
requirements.txt
:pip install -r requirements.txt
-
Run the Application: Once dependencies are installed, run the tool with:
streamlit run Image_Tool.py
Himanshi Maheshwari