Created
August 21, 2015 20:30
-
-
Save shawnr/38ac9f370bf274d97d2b to your computer and use it in GitHub Desktop.
Useful ImageMagick Shell Commands
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
find . -type f \( -iname \*.jpg -o -iname \*.png \) | while read f | |
do | |
convert $f -resize 600x $f | |
done | |
find . -type f \( -iname \*.jpg -o -iname \*.png \) | while read f | |
do | |
convert $f -resize 160x160 -set filename:f "%t.%e" +adjoin "%[filename:f]" | |
done | |
# Two commands to run on all files that come in properly named in the dir where they need to be | |
find . -type f -iname "*.png" | while read f | |
do | |
convert $f -scale 100% -set filename:f "%t_2x.%e" +adjoin "%[filename:f]" | |
convert $f -scale 50% -set filename:f "%t.%e" +adjoin "%[filename:f]" | |
done | |
find . -type f -iname "*.png" | while read f | |
do | |
convert $f -scale 50% -set filename:f "%t.%e" +adjoin "%[filename:f]" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment