Open Redmega opened 4 years ago
I think our case may provide the third solution.
We have images with known width (1200 px), but unknown height (anywhere between 500 and 3600 px) and it needs to be watermarked with replicated watermark (say, 50 by 150 px) with diagonal text. After tinkering with Imaginary I tried creating large 1200 by 3600 px watermark image, and shifted origin to -25:-75 and applying that giant watermark to original image. It turned out alright - the image remains within its original dimensions.
No need to use pipeline with 10 operations limit that way.
Is there a way to achieve replication with a watermark image? I've been searching but have yet to find anything.
These are the two solutions I came up with:
mirror
to overlay on the target.1 takes some dev effort and the limit of 10 pipeline actions would certainly get in the way. 2 would take a lot of bandwidth as Imaginary only takes a URL for the watermark image, so we'd need to send the image to s3 or some other service to get a url for Imaginary. Since each watermark would then be specific for a certain image, it wouldn't really be reusable so it would have to be deleted.
If it's supported by the built-in API, we could say that
/watermarkimage
hasnoreplicate: true
by default, so it's not a breaking change. Setting it to false would "stamp" the image with the watermarked image across the entire image.