MAC中用Shell脚本批量裁剪各种尺寸的App图标
2014-03-12 00:00
483 查看
在APP上架前,一次一次自己剪裁上架需要的各个尺寸的Icon不是程序员该干的事,使用Mac中自带的sips工具可以解决这个需求。
关于sips,在终端中直接执行可以出现以下信息:
它一个脚本图像处理系统,可用于查询和修改图像文件。
下面是刚写的IOS App Icon裁剪脚本,保存成一个.sh文件,在终端里输入sh xx.sh就可以执行了:
关于sips,在终端中直接执行可以出现以下信息:
sips 10.4.4 - scriptable image processing system. This tool is used to query or modify raster image files and ColorSync ICC profiles. Its functionality can also be used through the "Image Events" AppleScript suite. Try 'sips --help' or 'sips --helpProperties' for help using this tool
它一个脚本图像处理系统,可用于查询和修改图像文件。
下面是刚写的IOS App Icon裁剪脚本,保存成一个.sh文件,在终端里输入sh xx.sh就可以执行了:
#!/bin/sh filename="icon.png" dirname="cutimg" name_array=("Icon-29.png" "Icon-29@2x.png" "Icon-40@2x.png" "Icon-57.png" "Icon-57@2x.png" "Icon-120.png") size_array=("29" "58" "80" "57" "114" "120") mkdir $dirname for ((i=0;i<${#name_array[@]};++i)); do m_dir=$dirname/${name_array[i]} cp $filename $m_dir sips -Z ${size_array[i]} $m_dir done
相关文章推荐
- MAC中用Shell脚本批量裁剪各种尺寸的App图标
- Photoshop脚本 > 批量生成各尺寸的iOS图标
- MacOS copy图标shell脚本
- Shell脚本批量修改图片尺寸
- Photoshop脚本 > 批量生成各尺寸的iOS图标
- PHP实现批量生成App各种尺寸Logo
- APP开发如何批量生成不同尺寸的图标?
- shell脚本进行sftp文件批量上传与下载
- 探究Android的多分辨率支持以及各种类型图标尺寸大小
- iOS APP的图标尺寸、启动画面尺寸、宣传画面尺寸
- jenkins+gitlab钩子+shell脚本基于git的tag实现App增量更新
- 简易登录,批量执行命令,批量copy文件shell脚本【Linux运维之道之脚本案例】
- 探究Android的多分辨率支持以及各种类型图标尺寸大小
- Shell脚本批量添加扩展名的两种方法分享
- Shell脚本批量添加扩展名的两种方法分享
- shell脚本(一)批量修改图片名称
- shell脚本-批量添加用户并设置随机密码
- 获取同一网段下所有机器MAC地址的shell脚本
- iphone-批量打渠道包shell脚本
- 一键生成AppIcon 多种尺寸图标