[英]How to resize image assets for all Apple devices? (not launch images)
My app displays 2 buttons on the top and a car picture (1 of 4 possible) at the bottom: 我的应用程序在顶部显示2个按钮,在底部显示一张汽车图片(可能为4张之一):
Each image file has huge dimensions of 5616 x 3744 pixels and the app lags noticeably and also sometimes crashes (here fullscreen , Aspect Fill mode is used): 每个图像文件的尺寸均为5616 x 3744像素,并且该应用程序明显滞后甚至有时崩溃(在此使用全屏 , 宽高比填充模式):
So I would like to scale down the image assets and include these files (for each of the 4 car pictures) in my app: 因此,我想按比例缩小图像资源,并在我的应用程序中包含这些文件(针对4张汽车图片中的每张):
After searching around and I think I have to target the Rendered Pixels sizes, that is: 经过四处搜寻之后,我认为我必须指定“ 渲染像素”大小,即:
However my image view has 20 pixels insets (here fullscreen ): 但是我的图像视图有20像素的插图(这里是全屏 ):
So I am not sure, which value to subtract from the widths of car.jpg, car@2x.jpg and car@3x.jpg. 所以我不确定从car.jpg,car @ 2x.jpg和car@3x.jpg的宽度中减去哪个值。
Should I subtract 40 pixels from each file (that is 20 on the left and 20 on the right)? 我应该从每个文件中减去40个像素(左边20个像素,右边20个像素)吗?
只需将图像调整为最大尺寸(@ 3x)-它会比现在小得多, aspect fill
将处理其余部分
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.