Forked from anonymous/gist:a57883a80e02b4bab701
Last active
November 21, 2015 09:17
-
-
Save stefanofiorentino/fd2982d2d42df9d55afe to your computer and use it in GitHub Desktop.
How to get all iphone, ipad, windows phone and android icons from "App Icon Template 4.1"
This file contains hidden or 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 | |
# clear terminal window | |
clear | |
# variabili per creare sotto cartelle iOS, Android e WP | |
export RET_PATH=$PWD | |
###### iOS | |
mkdir ./iOS | |
echo "" | |
echo "=> Entering in $RET_PATH/iOS/" | |
cp *.png ./iOS/ | |
cd ./iOS | |
# 60@3x | |
cp iTunesArtwork.png AppIcon60x60\@3x.png | |
sips -Z 180 AppIcon60x60\@3x.png | |
# 29@2x-1 | |
cp AppIcon29x29\@2x.png AppIcon29x29\@2x-1.png | |
# 40@2x-1 | |
cp AppIcon40x40\@2x.png AppIcon40x40\@2x-1.png | |
# appstore | |
cp iTunesArtwork\@2x.png appstore.png | |
convert appstore.png -flatten -alpha deactivate appstore.png | |
# launch_ipad | |
cp iTunesArtwork\@2x.png launch_ipad.png | |
sips -Z 708 launch_ipad.png | |
sips --padToHeightWidth 1024 768 launch_ipad.png | |
convert launch_ipad.png -flatten -alpha deactivate launch_ipad.png | |
# launch_ipad@2x | |
cp iTunesArtwork\@2x.png launch_ipad\@2x.png | |
sips --padToHeightWidth 2048 1536 launch_ipad\@2x.png | |
convert launch_ipad\@2x.png -flatten -alpha deactivate launch_ipad\@2x.png | |
# launch_r4 | |
cp iTunesArtwork\@2x.png launch_r4.png | |
sips -Z 580 launch_r4.png | |
sips --padToHeightWidth 1136 640 launch_r4.png | |
convert launch_r4.png -flatten -alpha deactivate launch_r4.png | |
# launch | |
cp iTunesArtwork\@2x.png launch.png | |
sips -Z 580 launch.png | |
sips --padToHeightWidth 960 640 launch.png | |
convert launch.png -flatten -alpha deactivate launch.png | |
echo "" | |
echo "<= Coming back to $RET_PATH" | |
cd $RET_PATH | |
###### Android | |
mkdir ./Android | |
echo "" | |
echo "=> Entering in $RET_PATH/Android" | |
cd ./Android | |
# ic_launcher-web | |
cp ../iOS/iTunesArtwork.png ./ic_launcher-web.png | |
### drawable-xxhdpi 144 | |
mkdir drawable-xxhdpi | |
cp ../iOS/launch_ipad\@2x.png ./drawable-xxhdpi/sp_launcher.png | |
cp ic_launcher-web.png ./drawable-xxhdpi/ic_launcher.png | |
sips -Z 144 ./drawable-xxhdpi/ic_launcher.png | |
# drawable-xhdpi 96 | |
mkdir drawable-xhdpi | |
cp ./ic_launcher-web.png ./drawable-xhdpi/ic_launcher.png | |
sips -Z 96 ./drawable-xhdpi/ic_launcher.png | |
# drawable-hdpi 72 | |
mkdir drawable-hdpi | |
cp ./ic_launcher-web.png ./drawable-hdpi/ic_launcher.png | |
sips -Z 72 ./drawable-hdpi/ic_launcher.png | |
# drawable-mdpi 48 | |
mkdir drawable-mdpi | |
cp ./ic_launcher-web.png ./drawable-mdpi/ic_launcher.png | |
sips -Z 48 ./drawable-mdpi/ic_launcher.png | |
# store | |
cp ../iOS/iTunesArtwork.png ./store.png | |
# promo | |
cp ../iOS/iTunesArtwork\@2x.png ./promo.png | |
sips -Z 440 ./promo.png | |
sips --padToHeightWidth 500 1024 ./promo.png | |
convert ./promo.png -flatten -alpha deactivate ./promo.png | |
# promo2 | |
cp ../iOS/iTunesArtwork\@2x.png ./promo2.png | |
sips -Z 80 ./promo2.png | |
sips --padToHeightWidth 120 180 ./promo2.png | |
convert ./promo2.png -flatten -alpha deactivate ./promo2.png | |
echo "" | |
echo "<= Coming back to $RET_PATH" | |
cd $RET_PATH | |
###### WP | |
mkdir ./WP | |
echo "" | |
echo "=> Entering in $RET_PATH/WP" | |
cd ./WP | |
# store | |
cp ../iOS/iTunesArtwork\@2x.png ./store.png | |
sips -Z 300 ./store.png | |
convert ./store.png -flatten -alpha deactivate ./store.png | |
# SplashScreenImage.jpg | |
cp ../iOS/iTunesArtwork\@2x.png ./SplashScreenImage.png | |
sips -Z 660 ./SplashScreenImage.png | |
sips --padToHeightWidth 1280 720 ./SplashScreenImage.png | |
convert ./SplashScreenImage.png -flatten -alpha deactivate ./SplashScreenImage.png | |
convert ./SplashScreenImage.png ./SplashScreenImage.jpg | |
# FlipCycleTileMedium.png | |
cp ../iOS/iTunesArtwork\@2x.png ./FlipCycleTileMedium.png | |
sips -Z 202 ./FlipCycleTileMedium.png | |
convert ./FlipCycleTileMedium.png -flatten -alpha deactivate ./FlipCycleTileMedium.png | |
# FlipCycleTileSmall.png | |
cp ../iOS/iTunesArtwork\@2x.png ./FlipCycleTileSmall.png | |
sips -Z 110 ./FlipCycleTileSmall.png | |
convert ./FlipCycleTileSmall.png -flatten -alpha deactivate ./FlipCycleTileSmall.png | |
# ApplicationIcon.png | |
cp ../iOS/iTunesArtwork\@2x.png ./ApplicationIcon.png | |
sips -Z 100 ./ApplicationIcon.png | |
convert ./ApplicationIcon.png -flatten -alpha deactivate ./ApplicationIcon.png | |
echo "" | |
echo "<= Coming back to $RET_PATH" | |
cd $RET_PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment