Last active
May 11, 2020 14:37
-
-
Save nickferrando/d02054f85c8a34194267452a82cd8407 to your computer and use it in GitHub Desktop.
Proportional Resizing Overlays with ImageMagick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Make sure to replace "YOURPATH" with your logo/graphic overlay path, on line 5. | |
for f in *.png *.jpg | |
do magick $f -set option:sz "%[fx:min(w,h)*20/100]" \ | |
\( YOURPATH -resize "%[sz]" \) \ | |
-alpha on -channel rgba -gravity northeast \ | |
-define compose:args=50,100 -composite $f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment