fmw42 wrote: ↑2017-10-01T12:04:54-07:00
An alternate approach (not tested) would be the following in IM 7. [...]
Code: Select all
magick backgroundimage watermark1 watermark2 xc:none \
-set option:watermark_id "%[fx:(w==565)||(w==1024)?1:(w==2048)?2:3]" \
\( -clone 0 -clone "%[watermark_id]" -compose modulate \
-define compose:args={brigthness}[,{saturation}] -composite \) \
-delete 0-3 resultimage
Here's another very similar idea (works on IM7 in Windows, not tested in *nix)...
Code: Select all
magick input.png wm_sm.png wm_lg.png xc:none \
-duplicate "1,%[fx:(w==565)||(w==1024)?1:(w==2048)?2:3]" -delete 1-3 \
-gravity southeast -geometry +5+5 -compose blend -define compose:args=50 -composite output.png
That builds a stack from the main input, both watermarks, and a transparent canvas. Then based on the main input width it makes a single duplicate of the small watermark, the large watermark, or the transparent canvas. Now the input image is first in the stack and the correct watermark is last, so get rid of everything between with "-delete 1-3". Then set gravity, geometry, blending level, etc., and finish with "-composite" and an output file name.
Edited: Corrected a correction.