iOS快捷制作出匹配各种尺寸的icon

github 开源项目 ios-icon-generator

使用步骤

  • 安装ImageMagick
    进入终端,敲如下命令
sudo brew install ImageMagick
  • 安装完成后,下载开源项目到本地,并对文件赋予最高权限
//克隆到本地 
git clone https://github.com/smallmuou/ios-icon-generator

//进入本地文件夹,对文件ios-icon-generator.sh赋予权限
 cd ios-icon-generator
 chmod 777 ios-icon-generator.sh
  • 执行脚本,生成icon
StarnetdeMacBook-Pro:ios-icon-generator starnet$ ./ios-icon-generator.sh ~/Downloads/1024.png ~/output
[INFO] Generate iTunesArtwork.png ...
[INFO] Generate [email protected] ...
[INFO] Generate Icon-Small.png ...
[INFO] Generate [email protected] ...
[INFO] Generate [email protected] ...
[INFO] Generate Icon-Small-40.png ...
[INFO] Generate [email protected] ...
[INFO] Generate [email protected] ...
[INFO] Generate Icon-60.png ...
[INFO] Generate [email protected] ...
[INFO] Generate [email protected] ...
[INFO] Generate Icon-76.png ...
[INFO] Generate [email protected] ...
[INFO] Generate Icon.png ...
[INFO] Generate [email protected] ...
[INFO] Generate Icon-72.png ...
[INFO] Generate [email protected] ...
[INFO] Generate Icon-Small-50.png ...
[INFO] Generate [email protected] ...
[INFO] Generate Done.

Tip

./ios-icon-generator.sh ~/Downloads/1024.png ~/output 命令格式为:./ios-icon-generator.sh 原图路径(~/Downloads/1024.png) 生成icon的保存路径(~/output )


Usage

VERSION: 1.0.0
USAGE:
    ./ios-icon-generator.sh srcfile dstpath

DESCRIPTION:
    This script aim to generate ios app icons easier and simply.

    srcfile - The source png image. Preferably above 1024x1024
    dstpath - The destination path where the icons generate to.

    This script is depend on ImageMagick. So you must install ImageMagick first
    You can use 'sudo brew install ImageMagick' to install it

AUTHOR:
    Pawpaw

LICENSE:
    This script follow MIT license.

EXAMPLE:
    ./ios-icon-generator.sh 1024.png ~/123

你可能感兴趣的:(iOS快捷制作出匹配各种尺寸的icon)