为了方便UI切图,自动将@6x倍图缩放为@1x @2x @3x倍图
-
安装ImageMagick
使用之前,首先做以下几件事情。
Homebrew的安装 Homebrew官网
通过Homebrew安装ImageMagic
sudo brew install ImageMagick
-
Clone 以及 修改权限
git clone https://github.com/Guicai-Li/auto-image-scale.git cd ios-icon-generator chmod 777 autoImageScale.sh
-
将脚本autoImageScale.sh放到需要处理图片的文件夹中使用
➜ auto-image-scale git:(master) ✗ ./autoImageScale.sh avatar.png @1x is ok avatar.png @2x is ok avatar.png @3x is ok avatar.png 原图已删除
- 1.0.0
- 当前路径下直接将@6x图变成@1x @2x @3x图片
-
根据参数选择生成低倍图片
-
根据参数选择生成路径
-
类型转换格式