iOS应用图片尺寸制作脚本
1、前提说明
- 通常
2、代码使用说明
2.1 脚本基本代码
#!/bin/sh iPhoneIcon() {
sips -z 30 25 if_connected_green.png --out ./AppIcon/netdetail_down.png
sips -z 60 50 if_connected_green.png --out ./AppIcon/netdetail_down@2x.png
sips -z 90 75 if_connected_green.png --out ./AppIcon/netdetail_down@3x.png
} rm -r -f AppIcon
mkdir AppIcon
iPhoneIcon
2.2 参数说明

2.3 使用流程
- 打开命令窗口

- 进入文件夹及各文件说明

- 运行脚本 sh AppIcon.sh

- 运行结果查看,进入输出文件夹


- 打开命令窗口
3、app 图标与启动图尺寸脚本程序
- 适配时间:2018年,适配iphoneX Max
3.1 app图标AppIcon.sh
#!/bin/sh iPhoneIcon() {
sips -z 40 40 icon.png --out ./AppIcon/icon_20@2x.png
sips -z 60 60 icon.png --out ./AppIcon/icon_20@3x.png sips -z 58 58 icon.png --out ./AppIcon/icon_29@2x.png
sips -z 87 87 icon.png --out ./AppIcon/icon_29@3x.png sips -z 80 80 icon.png --out ./AppIcon/icon_40@2x.png
sips -z 120 120 icon.png --out ./AppIcon/icon_40@3x.png sips -z 120 120 icon.png --out ./AppIcon/icon_60@2x.png
sips -z 180 180 icon.png --out ./AppIcon/icon_60@3x.png sips -z 1024 1024 icon.png --out ./AppIcon/appStore_1024.png } iPadIcon() { sips -z 20 20 icon.png --out ./AppIcon/iPad_20.png
sips -z 40 40 icon.png --out ./AppIcon/iPad_20@2x.png sips -z 29 29 icon.png --out ./AppIcon/iPad_29.png
sips -z 58 58 icon.png --out ./AppIcon/iPad_29@2x.png sips -z 40 40 icon.png --out ./AppIcon/iPad_40.png
sips -z 80 80 icon.png --out ./AppIcon/iPad_40@2x.png sips -z 76 76 icon.png --out ./AppIcon/iPad_76.png
sips -z 152 152 icon.png --out ./AppIcon/iPad_76@2x.png sips -z 167 167 icon.png --out ./AppIcon/iPad_83.5@2x.png } rm -r -f AppIcon
mkdir AppIcon
iPhoneIcon
iPadIcon
3.2 启动图AppLaunch.sh
#!/bin/sh setImage(){
sips -z 960 640 default.png --out ./LaunchImage/Default640x960.png
sips -z 1136 640 default.png --out ./LaunchImage/Default640x1136.png
sips -z 1334 750 default.png --out ./LaunchImage/Default750x1334.png
sips -z 2208 1242 default.png --out ./LaunchImage/Default1242x2208.png
sips -z 2436 1125 default.png --out ./LaunchImage/Default1125x2436.png
sips -z 1792 828 default.png --out ./LaunchImage/Default828x1792.png
sips -z 2688 1242 default.png --out ./LaunchImage/Default1242x2688.png sips -z 640 960 ./AllSourceImage/AppLaunch.png --out ./OutPut/LaunchImage/Default640x960.png
sips -z 640 1136 ./AllSourceImage/AppLaunch.png --out ./OutPut/LaunchImage/Default640x1136.png
sips -z 750 1334 ./AllSourceImage/AppLaunch.png --out ./OutPut/LaunchImage/Default750x1334.png
sips -z 1242 2208 ./AllSourceImage/AppLaunch.png --out ./OutPut/LaunchImage/Default1242x2208.png
sips -z 1125 2436 ./AllSourceImage/AppLaunch.png --out ./OutPut/LaunchImage/Default1125x2436.png
sips -z 828 1792 ./AllSourceImage/AppLaunch.png --out ./OutPut/LaunchImage/Default828x1792.png
sips -z 1242 2688 ./AllSourceImage/AppLaunch.png --out ./OutPut/LaunchImage/Default1242x2688.png
} #调用函数
mkdir LaunchImage
setImage
iOS应用图片尺寸制作脚本的更多相关文章
- iOS改变图片尺寸
- (UIImage *)originImage:(UIImage *)image scaleToSize:(CGSize)size { UIGraphicsBeginImageContext(siz ...
- iOS 调整图片尺寸,告诉你的UI,别问我尺寸!我要最大的
如果UI问你“这个图片你要多大尺寸的?”,你该怎么回答呢? 为了不让图片因拉伸或压缩而变形或模糊,请精确告诉UI图片的比例,至于图片的分辨率,不必要要求太严,但是最低要求是要让最大的屏幕不会出现前面描 ...
- iOS 之图片尺寸
打包上线需要的图标 启动图片 本地需要的图标 参考 参考1:http://blog.csdn.net/kepoon/article/details/39693591 参考2:https://devel ...
- [ios]关于ios开发图片尺寸的建议
1.以后的应用程序,都使用AutoLayout, 不要再用绝对定位. 2.使用类似网页的方式来设计界面. 3.设计师好,程序员也好,尽量使用点这个单位进行思考,而不要使用像素.比如,你需要做44 x ...
- IOS开发-图片尺寸
在这篇文章当中,不会讲述关于具体px pt,分辨率,像素的问题,在这篇文章中,只会谈及到一些展现的问题 如果想了解更多关于pt,px之间的关系可以自行到百度查找相关的答案,或者到以下地址阅读更多相关的 ...
- iOS根据Url 获取图片尺寸
iOS根据Url 获取图片尺寸 // 根据图片url获取图片尺寸 +(CGSize)getImageSizeWithURL:(id)imageURL { NSURL* URL = nil; if([i ...
- 大屏iPhone的适配 +iOS 图片尺寸要求
摘自:http://blog.ibireme.com/2014/09/16/adapted_to_iphone6/ 苹果公司官网设计介绍到:Retina显示屏的超高像素密度已超过人眼能分辨的范围.Re ...
- Shell脚本批量修改图片尺寸
#!/bin/sh function scandir(){ local cur_dir parent_dir workdir workdir=$ cd ${workdir} if [ ${workdi ...
- iOS 图片大小压缩 图片尺寸处理
图片的压缩其实是俩概念,1.是 “压” 文件体积变小,但是像素数不变,长宽尺寸不变,那么质量可能下降,2.是 “缩” 文件的尺寸变小,也就是像素数减少.长宽尺寸变小,文件体积同样会减小. 这个 UII ...
随机推荐
- java 异步操作
/** * 异步删除 * * @param keys */ public void asycExecute(String keys) { ExecutorService executor = Exec ...
- Android dump命令查看某个apk是被谁安装的?
adb shell dumpsys package packages > packageAll.txt ORadb shell pm dump packages > package ...
- xmlns:amq="http://activemq.apache.org/schema/core"报错
如题,项目集成ActiveMQ是配置文件报错 原因是:Spring命名空间配置错误,缺少相应的spring-bean.很显然,引用不到就是没有jar包啊. 我的解决办法,早pom.xml引用依赖 &l ...
- [LeetCode] 109. Convert Sorted List to Binary Search Tree 把有序链表转成二叉搜索树
Given a singly linked list where elements are sorted in ascending order, convert it to a height bala ...
- 使用SyncNavigator轻松实现数据库异地同步、断点续传、异构同步
原文地址:https://blog.csdn.net/liushuijinger/article/details/7704410/ 最近一直在研究数据库同步的问题,在网上查了很多资料,也请教了很多人, ...
- 【C/C++开发】C++实现字符串替换的两种方法
替换字符串replace() erase() //C++ 第一种替换字符串的方法用replace()|C++ 第二种替换字符串的方法用erase()和insert()[ C++string|C++ r ...
- Python 内置函数--super()
描述 super() 函数是用于调用父类(超类)的一个方法. super 是用来解决多重继承问题的,直接用类名调用父类方法在使用单继承的时候没问题,但是如果使用多继承,会涉及到查找顺序(MRO).重复 ...
- Linq查询连接guid与varchar字段
使用场景 在数据库设计中进场会出现一些通用表,如通用附件表,一般都是通过ForeignTable(关联的表名)和ForeignKey(关联表的主键)与其他表关联.这样的表在数据库中没有外键关系,而且一 ...
- Ackermann Steering System
Source : https://www.hotrod.com/articles/ctrp-0407-ackermann-steering-system/ Tuning Your Steering S ...
- 数据结构与算法(Python)
数据结构与算法(Python) Why? 我们举一个可能不太恰当的例子: 如果将最终写好运行的程序比作战场,我们码农便是指挥作战的将军,而我们所写的代码便是士兵和武器. 那么数据结构和算法是什么?答曰 ...