Last active
October 16, 2018 18:03
-
-
Save AKiniyalocts/90025dde8d5667b09f68 to your computer and use it in GitHub Desktop.
Generate resized icons for your android applications using imagemagick!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This requires imagemagick (a super awesome image tool) | |
# Install via: sudo apt-get install imagemagick | |
echo "Enter the path to the 512x512 icon" | |
read icon | |
mkdir "drawable-mdpi" "drawable-hdpi" "drawable-xhdpi" "drawable-xxhdpi" "drawable-xxxhdpi" | |
IC_LAUNCHER='ic_launcher.png' | |
convert $icon -resize 192x192 drawable-xxxhdpi/$IC_LAUNCHER | |
convert $icon -resize 144x144 drawable-xxhdpi/$IC_LAUNCHER | |
convert $icon -resize 96x96 drawable-xhdpi/$IC_LAUNCHER | |
convert $icon -resize 72x72 drawable-hdpi/$IC_LAUNCHER | |
convert $icon -resize 48x48 drawable-mdpi/$IC_LAUNCHER | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment