One-click iOS APP icon generation

Source: Internet
Author: User
Tags imagemagick

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.