#!/bin/bash
## Create the .pngs from a 512x512 img using "convert"
img=logo512.png
convert $img -resize 192x192 /tmp/a.png && pngcrush -reduce -brute /tmp/a.png app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
convert $img -resize 144x144 /tmp/a.png && pngcrush -reduce -brute /tmp/a.png app/src/main/res/mipmap-xxhdpi/ic_launcher.png
convert $img -resize 96x96 /tmp/a.png && pngcrush -reduce -brute /tmp/a.png app/src/main/res/mipmap-xhdpi/ic_launcher.png
convert $img -resize 72x72 /tmp/a.png && pngcrush -reduce -brute /tmp/a.png app/src/main/res/mipmap-hdpi/ic_launcher.png
convert $img -resize 48x48 /tmp/a.png && pngcrush -reduce -brute /tmp/a.png app/src/main/res/mipmap-mdpi/ic_launcher.png

rm /tmp/a.png