Reputation: 33
I have a folder of images labelled: test.png and img000.png-img480.png
How can I overlay test.png onto every imgxxx.png individually?
Currently "magick test.png img000.png -compose over -composite result.png" works for a single .png, and I'm not sure how/if mogrify can be used for all of them.
Any help is greatly appreciated (non-imagemagick solutions would also be great!) thanks :)
Upvotes: 3
Views: 790
Reputation: 207345
Make a copy of a few test files in a separate directory then change to that directory and try this:
magick mogrify -draw 'image Over 180,100 0,0 test.png' img*png
The 180,100
specifies where it will be drawn, and the 0,0
says to use the current size of test.png
, i.e. no resizing. You can change the blend mode (i.e. Over
here) for different effects. Get a list of available blend modes with:
magick identify -list compose
If you would like the results written in a different directory called RESULTS
, use:
mkdir -p RESULTS
magick mogrify -path RESULTS -draw 'image SrcOver 180,100 0,0 test.png' img*png
Upvotes: 2