Overlay two images.
POST/image/overlay
Overlay two images.
Request
Header Parameters
- application/json
Bodyrequired
The URL of the front image.
The URL of the background image.
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
]
Whether to return the result as a buffer or a URL. Default is buffer.
options object
The horizontal position of the front image on the back image.
The vertical position of the front image on the back image.
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
The output image format, e.g. jpeg
or png
. Default is jpeg
.
A custom file name. If this is not set, a randomly generated is used instead.
Responses
- 200
- 400
Success
- application/json
- application/octet-stream
- Schema
- Example (auto)
Schema
The URL of the overlayed image. Only available if getAsUrl
is true.
The filename of the image, if one was provided.
{
"url": "string",
"fileName": "string"
}
- Schema
Schema
Bad Request
- application/json
- Schema
- Example (auto)
Schema
{
"status": 0,
"errorMessage": "string"
}