Skip to main content

Overlay two images.

POST 

/image/overlay

Overlay two images.

Request

Header Parameters

    ipaas string

Bodyrequired

    frontImageUrlstringrequired

    The URL of the front image.

    backImageUrlstringrequired

    The URL of the background image.

    positionstring

    The position of the front image on the back image. This overrides options.horizontalPosition and options.verticalPosition.

    Possible values: [center, top-left, top-right, bottom-left, bottom-right]

    getAsUrlboolean

    Whether to return the result as a buffer or a URL. Default is buffer.

    options object
    horizontalPositionnumber

    The horizontal position of the front image on the back image.

    verticalPositionnumber

    The vertical position of the front image on the back image.

    opacitynumber

    The opacity of the front image. 1 means fully opaque, 0 means fully transparent. The value is multiplied with the existing alpha channel of the image, i.e. transparent images work without this setting. Default is 1.

    Possible values: >= 0 and <= 1

    typestring

    The output image format, e.g. jpeg or png. Default is jpeg.

    fileNamestring

    A custom file name. If this is not set, a randomly generated is used instead.

Responses

Success

Schema
    urlstringrequired

    The URL of the overlayed image. Only available if getAsUrl is true.

    fileNamestring

    The filename of the image, if one was provided.