Crop an image.
POST/image/crop
Crop an image.
Request
Header Parameters
ipaas string
- application/json
Bodyrequired
urlstring
The image URL
bufferstring
The image as a Base64-encoded buffer. Can be specified instead of url
.
options objectrequired
leftintegerrequired
The number of pixels that should be cropped on the left.
Example:
100
topintegerrequired
The number of pixels that should be cropped on the top.
Example:
100
widthintegerrequired
The width of the crop.
Example:
500
heightintegerrequired
The height of the crop.
Example:
500
getAsUrlboolean
Whether the result image should be returned as a URL. Default is false
.
fileNamestring
The file name of the result image. Default is a random ID.
Responses
- 200
- 400
Success
- application/json
- application/octet-stream
- Schema
- Example (auto)
Schema
urlstringrequired
The result image URL.
{
"url": "string"
}
- Schema
Schema
Bad Request
- application/json
- Schema
- Example (auto)
Schema
statusnumber
errorMessagestring
{
"status": 0,
"errorMessage": "string"
}