Skip to content

Instantly share code, notes, and snippets.

@dp-singh
Forked from benvium/resizeImagesFromXHDPI.sh
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dp-singh/855d566156449c55d4b8 to your computer and use it in GitHub Desktop.
Save dp-singh/855d566156449c55d4b8 to your computer and use it in GitHub Desktop.
#!/bin/bash -e
# Ensure we're running in location of script.
cd "`dirname $0`"
for f in *; do
if [[ $f == *.png ]];
then
echo "...$f"
convert $f -resize 37.5% ../res/drawable-ldpi/$f
convert $f -resize 50% ../res/drawable-mdpi/$f
convert $f -resize 75% ../res/drawable-hdpi/$f
convert $f -resize 100% ../res/drawable-xhdpi/$f
fi
done
echo "Complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment