Created
June 28, 2012 12:46
-
-
Save jeanregisser/3011165 to your computer and use it in GitHub Desktop.
Resize all Retina @2x images in this directory to their half-resolution counterparts 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 | |
RETINA_IMAGES=`find . -name "*@2x*.png"` | |
for retina_path in $RETINA_IMAGES | |
do | |
target_path="${retina_path/@2x/}" | |
convert -resize 50% $retina_path $target_path | |
echo "Converted ${retina_path} to ${target_path}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment