API: Center crop
Crops the center of an image. An online tool is available for this API call.
Request
POST /process/crop-center?aspectRatio=2:1&cropSize=1&input=0a6677...
input | The input image ID. |
aspectRatio | The aspect ratio of the picture, written as a width:height (e.g. 16:10), or as width-height ratio (e.g. 1.6). |
cropSize | The crop size with respect to the maximum possible crop, written as percentage (e.g. 80%), or as ratio (e.g. 0.8). |
expansion |
How the image shall be expanded for crop sizes above 100%. Two types of expansion are available:
|
outputFormat | The desired output format. Valid formats are PNG and JPEG. |
outputQuality | The desired JPEG compression quality, an integer between 50 and 100. The default value is 95 (high quality). Values below 85 may lead to visible compression artefacts. |
Response
200 OK
{ "crop": [80, 140, 640, 320], "output": "a1b002.." }
crop | The applied crop rectangle (x, y, width, height). |
output | The produced image. |
outputFormat |
The format of the output image:
|