Skip to content

Instantly share code, notes, and snippets.

@cab404 cab404/android-icons.sh
Last active Oct 7, 2016

Embed
What would you like to do?
Simple tool for converting multiple icons for Android app
#/bin/bash
#@author cab404
MUL=24
if [[ $1 != "" ]]; then
MUL=$1
fi
# Simple tool for converting multiple icons fo Android app
mkdir -p drawable-mdpi
mkdir -p drawable-hdpi
mkdir -p drawable-xhdpi
mkdir -p drawable-xxhdpi
# mkdir -p drawable-xxxhdpi
for F in $(ls | grep .png)
do
convert $F -resize $(( MUL * 2 )) drawable-mdpi/$F
convert $F -resize $(( MUL * 3 )) drawable-hdpi/$F
convert $F -resize $(( MUL * 4 )) drawable-xhdpi/$F
convert $F -resize $(( MUL * 6 )) drawable-xxhdpi/$F
# convert $F -resize $(( MUL * 8 )) drawable-xxxhdpi/$F
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.