Created
July 2, 2018 08:13
-
-
Save trifo13/7fd8cc511acc62010b85502e0664a7a6 to your computer and use it in GitHub Desktop.
bulk-scale-images.sh
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 | |
# Max Width | |
WIDTH=1200 | |
# Max Height | |
HEIGHT=800 | |
# Resize .jpg or .png to either height or width, preserve aspect ration: | |
find . -type f \( -name "*.jpg" -o -name "*.png" \) -exec convert \{} -verbose -resize $WIDTHx$HEIGHT\> \{} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment