Skip to content

Instantly share code, notes, and snippets.

@gduplessy
Forked from Lerg/prepare_icons.sh
Created August 25, 2016 16:56
Show Gist options
  • Select an option

  • Save gduplessy/571132ab424cf10bde64bc4544a55b37 to your computer and use it in GitHub Desktop.

Select an option

Save gduplessy/571132ab424cf10bde64bc4544a55b37 to your computer and use it in GitHub Desktop.
Make all app icons with imagemagick, iOS and Android
#!/bin/sh
base=$1
if [ -z $base ]
then
echo No argument given
else
##
## iOS files
convert "$base" -resize 29x29! "Icon-Small.png"
convert "$base" -resize 40x40! "Icon-Small-40.png"
convert "$base" -resize 50x50! "Icon-Small-50.png"
convert "$base" -resize 57x57! "Icon.png"
convert "$base" -resize 58x58! "[email protected]"
convert "$base" -resize 87x87! "[email protected]"
convert "$base" -resize 60x60! "Icon-60.png"
convert "$base" -resize 72x72! "Icon-72.png"
convert "$base" -resize 76x76! "Icon-76.png"
convert "$base" -resize 80x80! "[email protected]"
convert "$base" -resize 100x100! "[email protected]"
convert "$base" -resize 114x114! "[email protected]"
convert "$base" -resize 120x120! "[email protected]"
convert "$base" -resize 144x144! "[email protected]"
convert "$base" -resize 152x152! "[email protected]"
convert "$base" -resize 83.5x83.5! "[email protected]"
convert "$base" -resize 180x180! "[email protected]"
convert "$base" -resize 512x512! "iTunesArtwork"
convert "$base" -resize 1024x1024! "iTunesArtwork@2x"
##
## Android files
convert "$base" -resize 36x36! "Icon-ldpi.png"
convert "$base" -resize 48x48! "Icon-mdpi.png"
convert "$base" -resize 72x72! "Icon-hdpi.png"
convert "$base" -resize 96x96! "Icon-xhdpi.png"
convert "$base" -resize 144x144! "Icon-xxhdpi.png"
convert "$base" -resize 192x192! "Icon-xxxhdpi.png"
fi
@gduplessy
Copy link
Author

Requires imagemagick. Makes icons for all screen sizes of android and iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment