AWS_REGION=us-east-1 AWS_PROFILE=personal docker-compose up --remove-orphans --build
The simple interface will fetch the image from S3 and can convert it to either a PNG or JPEG at any compression or quality level - expressed as the optional query parameters shown below
GET localhost:8000/v1/s3/:bucket/:key?format=jpeg&quality=100
The 'complex' interface takes a PUT request and a JSON encoded body.
There are three main components of the json body.
Key | Required | Example Value |
---|---|---|
encoding | ✔️ | png |
quality | ❌ | 50 |
functions | ❌ | [] |
PUT localhost:8000/v1/s3/:bucket/:key
With JSON Body
{
"encoding": "jpeg",
"quality": 100,
"functions": [
{
"functionID": "resize",
"parameters": [
{
"key": "width",
"value": "1000"
},
{
"key": "height",
"value": "1200"
}
]
}
]
}
OpenCV Function | Implemented |
---|---|
Resize | ✔️ |
Rotate | ❌ |
Perspective Transform | ❌ |