One-click iOS APP icon generation
As the length of service grows, I find that I am getting lazy. For tedious things, I always want to do less. Just like the APP icon mentioned today, the usual practice is nothing more than two, first, let the UI engineer provide icons of all sizes, and second, the UI engineer provides a large icon to reduce it by itself. method 1 can be described as harmful and harmful. Although developers have less work, however, once the icon is adjusted, the UI engineer is tired and the developer is tired (to replace the icon by himself). method 2, it is tired. Open the PS, adjust the image size, and save the image, adjust image size, save ..., Today, it is finally intolerable to decide to write a script ios-icon-generator. The following is a brief introduction.
Prerequisites
It is a shell script that can be run directly in bash of MACOSX. It depends on powerful ImageMagick. Therefore, install ImageMagick before using it.
sudo brew install ImageMagick
Install
git clone https://github.com/smallmuou/ios-icon-generatorcd ios-icon-generatorchmod 777 ios-icon-generator.sh
Run
StarnetdeMacBook-Pro:ios-icon-generator starnet$ ./ios-icon-generator.sh ~/Downloads/1024.png ~/output[INFO] Generate iTunesArtwork.png ...[INFO] Generate iTunesArtwork@2x.png ...[INFO] Generate Icon-Small.png ...[INFO] Generate Icon-Small@2x.png ...[INFO] Generate Icon-Small@3x.png ...[INFO] Generate Icon-Small-40.png ...[INFO] Generate Icon-Small-40@2x.png ...[INFO] Generate Icon-Small-40@3x.png ...[INFO] Generate Icon-60.png ...[INFO] Generate Icon-60@2x.png ...[INFO] Generate Icon-60@3x.png ...[INFO] Generate Icon-76.png ...[INFO] Generate Icon-76@2x.png ...[INFO] Generate Icon.png ...[INFO] Generate Icon@2x.png ...[INFO] Generate Icon-72.png ...[INFO] Generate Icon-72@2x.png ...[INFO] Generate Icon-Small-50.png ...[INFO] Generate Icon-Small-50@2x.png ...[INFO] Generate Done.
Result
StarnetdeMacBook-Pro:ios-icon-generator starnet$ ls -l ~/output/total 288-rw-r--r-- 1 starnet staff 1921 May 18 17:45 Icon-60.png-rw-r--r-- 1 starnet staff 4723 May 18 17:45 Icon-60@2x.png-rw-r--r-- 1 starnet staff 6954 May 18 17:45 Icon-60@3x.png-rw-r--r-- 1 starnet staff 2210 May 18 17:45 Icon-72.png-rw-r--r-- 1 starnet staff 5565 May 18 17:45 Icon-72@2x.png-rw-r--r-- 1 starnet staff 2184 May 18 17:45 Icon-76.png-rw-r--r-- 1 starnet staff 5856 May 18 17:45 Icon-76@2x.png-rw-r--r-- 1 starnet staff 1437 May 18 17:45 Icon-Small-40.png-rw-r--r-- 1 starnet staff 3267 May 18 17:45 Icon-Small-40@2x.png-rw-r--r-- 1 starnet staff 4723 May 18 17:45 Icon-Small-40@3x.png-rw-r--r-- 1 starnet staff 1674 May 18 17:45 Icon-Small-50.png-rw-r--r-- 1 starnet staff 3992 May 18 17:45 Icon-Small-50@2x.png-rw-r--r-- 1 starnet staff 1168 May 18 17:45 Icon-Small.png-rw-r--r-- 1 starnet staff 1786 May 18 17:45 Icon-Small@2x.png-rw-r--r-- 1 starnet staff 2393 May 18 17:45 Icon-Small@3x.png-rw-r--r-- 1 starnet staff 1828 May 18 17:45 Icon.png-rw-r--r-- 1 starnet staff 4491 May 18 17:45 Icon@2x.png-rw-r--r-- 1 starnet staff 19995 May 18 17:45 iTunesArtwork.png-rw-r--r-- 1 starnet staff 30653 May 18 17:45 iTunesArtwork@2x.png
Summary
This script is very simple to use. You are welcome to use it.