Created
August 6, 2020 11:17
-
-
Save scottharwell/0389a189d5a6f8d721163589a4618087 to your computer and use it in GitHub Desktop.
Fish script that converts a 1024x1024px 72DPI image to the file sizes required by XCode
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
#!/usr/bin/env fish | |
if ! test -e ./AppIcon.png | |
echo "🚨 App icon file not found" | |
exit | |
end | |
echo "🎬 Creating Icons!" | |
cp ./AppIcon.png ./AppIcon@1024x1.png | |
cp ./AppIcon.png ./AppIcon@83.5x2.png | |
cp ./AppIcon.png ./AppIcon@76x2.png | |
cp ./AppIcon.png ./AppIcon@76x1.png | |
cp ./AppIcon.png ./AppIcon@40x2.png | |
cp ./AppIcon.png ./AppIcon@40x1.png | |
cp ./AppIcon.png ./AppIcon@29x2.png | |
cp ./AppIcon.png ./AppIcon@29x1.png | |
cp ./AppIcon.png ./AppIcon@20x2.png | |
cp ./AppIcon.png ./AppIcon@20x1.png | |
cp ./AppIcon.png ./AppIcon@60x3.png | |
cp ./AppIcon.png ./AppIcon@60x2.png | |
cp ./AppIcon.png ./AppIcon@40x3.png | |
cp ./AppIcon.png ./AppIcon@40x2.png | |
cp ./AppIcon.png ./AppIcon@29x3.png | |
cp ./AppIcon.png ./AppIcon@20x3.png | |
mogrify -resize 167 ./AppIcon@83.5x2.png | |
mogrify -resize 152 ./AppIcon@76x2.png | |
mogrify -resize 76 ./AppIcon@76x1.png | |
mogrify -resize 80 ./AppIcon@40x2.png | |
mogrify -resize 40 ./AppIcon@40x1.png | |
mogrify -resize 58 ./AppIcon@29x2.png | |
mogrify -resize 29 ./AppIcon@29x1.png | |
mogrify -resize 40 ./AppIcon@20x2.png | |
mogrify -resize 20 ./AppIcon@20x1.png | |
mogrify -resize 180 ./AppIcon@60x3.png | |
mogrify -resize 120 ./AppIcon@60x2.png | |
mogrify -resize 120 ./AppIcon@40x3.png | |
mogrify -resize 80 ./AppIcon@40x2.png | |
mogrify -resize 87 ./AppIcon@29x3.png | |
mogrify -resize 60 ./AppIcon@20x3.png | |
echo "🏁 Icons Created!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment