ImageOps is an open-source image processing API that provides a set of basic yet important functionalities to manipulate and transform images.
ImageOps aims to simplify image processing tasks by offering a straightforward API for common operations. This project was initiated to address the need for a flexible, easy-to-use image-processing solution for developers working on diverse projects. It should be noted that the API is still under development and is yet to be hosted externally.
How to contribute:
- Fork the repository: Start by forking the ImageOps repository to your GitHub account.
- Clone the repository: clone the forked repository to your local machine
git clone https://github.com/your-username/ImageOps.git
- Create a Branch: Create a new branch for your contribution
git checkout -b feature-or-fix-name
- Make and commit changes: Implement your desired feature or fix in the code.
- **Push changes: After committing the changes, push them to your forked repository
git push origin feature-or-fix-name
- Open a Pull Request: Create a pull request from your forked repository to the main ImageOps repository.
- In the repository folder, create a virtual environment(optional):
python -m venv venv
- Activate the environment:
- On Windows:
venv\Scripts\activate
- On MacOS/Linux:
source venv/bin/activate
- Install requirements:
pip install -r requirements.txt
The API can be tested locally by sending requests to 'http://127.0.0.1:5000/api/'
. First, the server should be started:
python app/main.py
A test image is included, with a testing code:
python testing/testing.py
ImageOps offers several endpoints for image processing tasks. here is a quick overview:
-
Grayscale Conversion:
- Endpoint: '/api/grayscale'
- Parameters:
- image (
.png
-> bytes): image to be converted
- image (
-
Negative Conversion:
- Endpoint: '/api/negative'
- Parameters:
- image (
.png
-> bytes): image to be converted
- image (
-
Half-toning transformation:
- Endpoint: '/api/half'
- Parameters:
- image (
.png
-> bytes): image to be half-toned using Floyd Steinberg's algorithm
- image (
-
Sobel Edge Detection:
- Endpoint: '/api/sobel_edge'
- Parameters:
- image (
.png
-> bytes): input image file for edge detection.
- image (
ImageOps relies on the following dependencies (some might be added/deleted as the project progresses):
- Flask
- NumPy
- CV2
- Pillow
All dependencies are listed in the requirements.txt
file.