Proportional watermarkimage
Can we make it possible to dynamically resize watermark image to a specified width (and height) before overlaying on the source image? The issue is that I deal with thousands of images of various resolutions and generating a proportional watermark image for every resolution, save to disk and pass the URL to the imaginary isn't very flexible/efficient. I am migrating from imagemagick and IM does support specifying desired width and height and the gravity for the watermark image and does in memory resizing. Can we get similar functionality to imaginary as well? This is the last thing that is pending for me (hopefully) to completely move to imaginary.
Thanks!
Can you solve it using pipelining?
Thanks. I indeed use pipeline but I am not quite sure how to resize a watermark image and pass it to /watermarkimage without saving the resized watermark image to the disk (as /watermarkimage expects a URL/rel path for the watermark image).
I thought it would be useful to provide an example:
magick source.jpg watermark-color.png -resize "%[fx:t?u.w*0.25:u.w]x" -gravity southeast -composite result.jpg
I use the above command to watermark a source image by specifying that the watermark image width should be 25% of the source image width (and height per the aspect ratio).
I'm also facing the same issue @foobargeez have you figured out how to solve it?
@istudko no :-/. I am watermarking using imagemagick after the image changes/transformations/optimizations by imaginary -- I really wish I can do this as part of the pipeline. Checkout https://imgproxy.net/ -- on my list to see if it solves this issue.