Skip to main content

Resize an image.

POST 

/image/resize

Resize an image.

Request

Header Parameters

    ipaas string

Bodyrequired

    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:

    • 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 is cover.

    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.

    anyOf
    string
    kernelstring

    The kernel that will be used for image reduction. Must be one of:

    • 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 is lanczos3.

    Possible values: [nearest, cubic, lanczos2, lanczos3]

    getAsUrlboolean
    fileNamestring

Responses

Success

Schema
    object