Skip to content

Instantly share code, notes, and snippets.

@ippa
Last active April 22, 2016 10:22
Show Gist options
  • Save ippa/614d8b087deddf107770c7a153de76ba to your computer and use it in GitHub Desktop.
Save ippa/614d8b087deddf107770c7a153de76ba to your computer and use it in GitHub Desktop.
shell-script to create android icons w/ the right sizes
#!/bin/sh
if [ $# -eq 0 ]; then
echo "./appicon.sh <sourceimage> - Will resize and install appicon into correct directories"
exit 1
fi
CONVERT="/c/Program/ImageMagick/convert.exe"
PATH=."/android/app/src/main/res/"
$CONVERT $1 -resize 72x72 $PATH/mipmap-hdpi/ic_launcher.png
$CONVERT $1 -resize 42x42 $PATH/mipmap-mdpi/ic_launcher.png
$CONVERT $1 -resize 96x96 $PATH/mipmap-xhdpi/ic_launcher.png
$CONVERT $1 -resize 144x144 $PATH/mipmap-xxhdpi/ic_launcher.png
$CONVERT $1 -resize 512x512 ./appicon_512x512.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment