You can use curl
to test the API by sending a POST request with an image file. Here's an example command:
curl -X POST -F "file=@/path/to/image.jpg" http://localhost:5000/convert --output converted.jpg
Replace /path/to/image.jpg
with the actual path to your image file. This command sends a POST request to the /convert
endpoint of the API with the image file as a form field. The API will convert the image using the Nord color palette and return the converted image file as a response.
You can modify the color palette and colors used by the API by modifying the GoNord
instance in main.py
.