Last active
September 9, 2021 10:41
-
-
Save Neolot/a60c97e4e337802f471f889fc080ae1a to your computer and use it in GitHub Desktop.
IMAGEMAGICK Bulk resize images
This file contains hidden or 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
#!/usr/bin/sh | |
cd images_processed | |
# Convert png to jpg | |
mogrify -format jpg -quality 90 *.png | |
rm -f *.png | |
# Resize images | |
for PHOTO in * | |
do | |
BASE=`basename $PHOTO` | |
convert "$PHOTO" -resize "1500x1500>" "$BASE" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment