Skip to content

Instantly share code, notes, and snippets.

@mathie
Created October 2, 2012 09:29
Show Gist options
  • Save mathie/3817785 to your computer and use it in GitHub Desktop.
Save mathie/3817785 to your computer and use it in GitHub Desktop.
Convert a bunch of png files that are already set for Retina display to the right filename, and produce non-Retina variants.
for i in *.png; do
j=${i/.png/@2x.png}
mv $i $j
convert $j -resize 50% $i
done
@mathie
Copy link
Author

mathie commented Oct 2, 2012

I never realised that -resize could take a percentage before, I thought it was always a geometry.

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