The Image Unmirrorer
This project provides a set of APIs for image manipulation and processing, currently under active development. The /mirror endpoint allows users to upload an image and receive a horizontally mirrored version, while the /grayscale endpoint returns a grayscale version of the uploaded image.
Developed in Elixir and containerized with Docker, the project is easy to set up and deploy. It serves as an excellent example application for newcomers to Elixir programming, demonstrating fundamental concepts in API design and image processing.
- Mirrors/grayscale uploaded images (supports JPEG and PNG formats).
- Easy integration via RESTful API.
Explore the features of the application through the link below:
🔗 Try the Live Demo (https://image-unmirrorer.gigalixirapp.com/testgrayscale.html)
To access the API specification (OpenAPI), click the link below:
- Docker
- Elixir (if you wish to run it locally without Docker)
-
Clone the repository:
git clone https://github.com/mmilk23/image_unmirrorer.git cd image_unmirrorer
-
Build and run the container:
docker build -t image_unmirrorer . docker run -p 4000:4000 image_unmirrorer
-
Access the application in your browser:
http://localhost:4000
-
Clone the repository:
git clone https://github.com/mmilk23/image_unmirrorer.git cd image_unmirrorer
-
Install dependencies:
mix deps.get
-
Compile the project:
mix clean mix compile
-
Run the application:
mix run --no-halt
-
Access the application in your browser:
http://localhost:4000
- POST /mirror: Receives an image and returns its horizontally mirrored version.
- POST /grayscale: Receives an image and returns a grayscale version of the image.
- GET /openapi.json: Provides the OpenAPI specification for the API.
curl -X POST http://localhost:4000/mirror -H "Content-Type: image/jpeg" --data-binary @your_image.jpg -o image-mirror.jpg
You can test the application by accessing the testmirror.html
file in your browser:
http://localhost:4000/testmirror.html
http://localhost:4000/testgrayscale.html
Alternatively, you can use a CURL command:
curl -X POST -H "Content-Type: image/jpeg" --data-binary @your_image.jpg http://localhost:4000/mirror --output image-mirror.jpg
To run coverage tests:
mix test --cover
- Elixir
- Docker
Contributions are more than welcome! Feel free to submit a pull request or open an issue to discuss improvements or report bugs.
This project is licensed under the MIT License.
This project was developed as part of a system architecture playground and is not recommended for production environments without an in-depth review.
If you found this project helpful, please consider giving it a star ⭐️.
For more information, visit the GitHub repository.