Skip to content

Instantly share code, notes, and snippets.

@jeanregisser
Created June 28, 2012 12:46
Show Gist options
  • Save jeanregisser/3011165 to your computer and use it in GitHub Desktop.
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
#!/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