Skip to content

Instantly share code, notes, and snippets.

@gingertom
Created February 26, 2013 12:22
Show Gist options
  • Save gingertom/5038071 to your computer and use it in GitHub Desktop.
Save gingertom/5038071 to your computer and use it in GitHub Desktop.
Simple image magic script to go through a folder of @2x images and make non-retina copies of them too. Usage (run in folder to affect): path/to/resizer/resizer.sh
#!/bin/bash -e
cd "${1-.}"
for f in *; do
if [[ $f == *@2x* ]];
then
convert $f -resize 50% ${f//@2x/}
fi
done
@benvium
Copy link

benvium commented Apr 19, 2013

Very useful. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment