我们可以跳过将图像放在1倍,2倍中,但仅放入3倍资产中。

发布于 2025-02-13 20:06:50 字数 869 浏览 0 评论 0 原文

我们可以跳过将图像放在1倍,2倍中,但仅放入3倍资产中。

为了增加销售,我们计划在我们的应用程序中放置大量高分辨率屏幕快照图像。

但是,我们不想大大增加应用程序的规模。

这是我们的计划,

  1. 我们将在Internet上放置高分辨率750x1334屏幕截图(通过iPhone SE Simulator捕获)
  2. 我们将在Assets.xcassets中放置一个低分辨率150x267图像,3倍类别

“在此处输入映像说明”

  1. 然后,我们将使用以下图像加载库,以显示图像

imageView.kf.setImage(
    with: URL(string: "https://raw.githubusercontent.com/yccheok/wenote.jstock.co/master/ios/color_custom.png"),
    placeholder: UIImage(named: "color_custom")
)

用户将观察一个模糊图像几秒钟(如果他具有良好的Internet连接),则图像将传输到清晰的图像。

对于上述用例,我想知道,可以离开2x& 1x类别为空?是否有任何副作用,将2倍和1x类别留为空白?

,或者,我应该将1张和只有1个图像放在1x类别中吗?

谢谢。

Can we skip placing image in 1x, 2x but only placing in 3x Assets.xcassets, for app size optimization purpose?

In order to increase sales, we plan to place a high number of high resolution screenshot images, within our app.

However, we do not want to increase our app size significantly.

This is our plan

  1. We will place high resolution 750x1334 screenshot (Captured via iPhone SE simulator) over the Internet
  2. We will place a scale down low resolution 150x267 image, in Assets.xcassets, under 3x category

enter image description here

  1. We will then use the following image loading library, to show the image

imageView.kf.setImage(
    with: URL(string: "https://raw.githubusercontent.com/yccheok/wenote.jstock.co/master/ios/color_custom.png"),
    placeholder: UIImage(named: "color_custom")
)

User will then observe a blur image for few seconds (If he has a good internet connection), then the image will transit to a crystal clear image.

For the above use case, I was wondering, is it OK to leave 2x & 1x category as blank? Is there any side effect, of leaving 2x and 1x category blank?

Or, should I place the 1 and only 1 image, in 1x category?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

自由范儿 2025-02-20 20:06:50

出于此特定目的(当您只有一个图像而不是图像时),您可以使用单一比例

enter image description herefor this specific purpose ( when you have only one image , not for icons ) , you can use single scale like this

花辞树 2025-02-20 20:06:50

根据图像的大小,只要捆绑3倍图像就可以了。它们会自动在2X和1X设备上缩放(我不确定是否仍然有任何1X设备由当前Xcode版本支持;还取决于您的部署目标)。

无论如何,如果可以的话,请查看实际2X设备上的输出,并确定是否可以接受缩放质量损失。直线看起来可能有些模糊,并且取决于图像,这可能是可以接受的。

Depending on the size of your images, it may be alright to just bundle 3x images. They get scaled on 2x and 1x devices automatically (I'm not sure whether there are still any 1x devices that are supported by current Xcode versions; also depends on your deployment target).

In any case, look at the output on an actual 2x device, if you can, and decide whether the quality loss due to scaling is acceptable. Straight lines may look slightly blurry and depending on the image, this may be acceptable or not.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文