Resize an image.
POST/image/resize
Resize an image.
Request
Header Parameters
ipaas string
- application/json
Bodyrequired
cover
: Crop the image so the entire dimensions are filled.contain
: Do not crop the image, so parts of the result will be empty and the entire image is contained.fill
: Stretch the image to fill the dimensions without cropping or empty space.inside
: Resize the image to be as large as possible without width or height being greater than the desired dimensions.outside
: Resize the image to be as small as possible without width or height being smaller than the desired dimensions. Default iscover
.- string
- object
nearest
: Use nearest neighbor interpolation.cubic
: Use a Catmull-Rom spline.lanczos2
: Use a Lanczos kernel with a = 2.lanczos3
: Use a Lanczos kernel with a = 3. Default islanczos3
.
urlstring
bufferstring
widthinteger
heightinteger
options object
fitstring
How to resize the image to fit if both width
and height
are specified. Must be one of:
Possible values: [contain
, cover
, fill
, inside
, outside
]
positionstring
Possible values: [center
, top
, right top
, right
, right bottom
, bottom
, left bottom
, left
, left top
, north
, northeast
, east
, southeast
, south
, southwest
, west
, northwest
, entropy
, attention
]
background object
The color for the space not covered by the resized image. Default is black.
string
rnumber
gnumber
bnumber
alphanumber
kernelstring
The kernel that will be used for image reduction. Must be one of:
Possible values: [nearest
, cubic
, lanczos2
, lanczos3
]
getAsUrlboolean
fileNamestring
Responses
- 200
- 400
Success
- application/json
- Schema
- Example (auto)
Schema
object
{}
Bad Request
- application/json
- Schema
- Example (auto)
Schema
statusnumber
errorMessagestring
{
"status": 0,
"errorMessage": "string"
}