This Flask application allows users to upload images, apply various effects, and compare the original and processed images side by side. Users can also save the processed images.
your_project/
│
├── static/
│ ├── css/
│ │ └── styles.css
│ └── js/
│ └── scripts.js
├── templates/
│ └── upload.html
└── ximageapp.py
- Python 3.x
- Flask
- Pillow (PIL)
effects_aggregator
module (this contains your image effects functions)
-
Clone the repository or download the files.
-
Install the required Python packages:
pip install Flask Pillow
- Ensure your
effects_aggregator
module is in the project directory or install it if it is a separate package.
-
Navigate to the project directory.
-
Run the Flask application:
python ximageapp_0x.py
- Open your web browser and go to
http://127.0.0.1:5000
.
This is the main application file that sets up the Flask server, handles file uploads, applies image effects, and serves the processed images.
This is the main HTML template for the application. It provides the user interface for uploading files, selecting effects, and comparing images.
This file contains the styles for the application.
This file contains the JavaScript functionality for the image comparison slider.
- Upload an Image: Click "Choose File" and select an image from your computer. Then click "Upload".
- Apply an Effect: Choose an effect from the drop-down menu and click "Apply Effect".
- Compare Images: Use the slider to compare the original and processed images.
- Save the Processed Image: Click the "Save" button to save the processed image to the predefined directory.