Created
July 12, 2016 01:18
-
-
Save Rady/46fdd1d4031a21121deab9efe8b9b89f to your computer and use it in GitHub Desktop.
Use ImageMagick batch resizing and cropping 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
#!/bin/bash | |
mkdir -p resize thumb | |
for i in *.jpg; do | |
convert $i -resize '546x366^' -gravity center -crop '546x366+0+0' -quality 100 resize/$i | |
convert $i -resize '120x70^' -gravity center -crop '120x70+0+0' -quality 100 thumb/$i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment