API: Intelligent crop

Applies the croppola algorithm to find the most interesting part of an image. An online tool is available for this API call.

Request
POST /process/crop-auto?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).
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:
  • extension: The format extension, e.g. "png".
  • mimeType: The media type of the format, e.g. "image/png".
  • quality: The JPEG compression quality (JPEG pictures only).