Overlay
You can overlay an image with another. This feature is useful if you wish to create a watermark or simply an image composition
Usage
Accepted parameters are
url: the url of the overlay image. The url must be escaped and must be the first parameter.
g: the gravity to position the overlay. This is ignored if specific coordinates are passed.
x: The position on the right-left axis.
y: The position on the top-bottom axis.
watermark: Repeat the overlay image
https://caravaggio.now.sh/overlay_https%3A%2F%2Fcaravaggio.ramielcreations.com%2Fimg%2Fcaravaggio-logo.jpeg_gsoutheast/https://cvg-res.now.sh/girls.jpeg
Result
Examples
Position with gravity
You can position the watermark using the gravity parameter. Here an example putting the watermark on the west (center-left) side of the image.
https://caravaggio.now.sh/overlay_https%3A%2F%2Fcaravaggio.ramielcreations.com%2Fimg%2Fcaravaggio-logo.jpeg_gw/https://cvg-res.now.sh/girls.jpeg
Result
Positioning with coordinates
You can specify coordinates to position the overlay. In that case any gravity values will be ignored. Let's position the overlay at position x: 100px
and y: 60%
of the total image height. Coordinates refers to top-left corner of the overlay.
x
and y
can be expressed as pixels or percentage as explained here.
https://caravaggio.now.sh/overlay_https%3A%2F%2Fcaravaggio.ramielcreations.com%2Fimg%2Fcaravaggio-logo.jpeg_x100_y0.6/https://cvg-res.now.sh/girls.jpeg
Result
Watermark repeat
The overlay can be repeated using watermark
option.
https://caravaggio.now.sh/overlay_"https%3A%2F%2Fcvg-res.now.sh%2Foverlay.png%3Finline%3Dtrue"_watermark/https://cvg-res.now.sh/girls.jpeg
Result