新 iPhone 6 和 6+ 的图像分辨率,添加了@3x 支持? [英] Image resolution for new iPhone 6 and 6+, @3x support added?

查看:17
本文介绍了新 iPhone 6 和 6+ 的图像分辨率,添加了@3x 支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过几篇文章和讨论,比如一个在这里这里 关于新 iPhone 将使用@3x 图像显示的图像分辨率.这是真的吗?

I have looked on few articles and discussion like one here and Here about image resolutions that new iPhones will use @3x images for display. Is it true?

这是否意味着我们必须保留三个图像?比如说我有一张 50 X 50 的图片,我是否需要保留 3 张图片来优化新 iPhone 的外观?

So does it mean we will have to keep three images? Say for example I have an image of 50 X 50, will I have to keep 3 images for optimizing the look for new iPhones?

  • 普通 (50 X 50)
  • @2x - 视网膜 (100 X 100)
  • @3x - 视网膜高清 (150 X 150)

或者新手机只会使用@2x 图像而没有像@3x 这样的图像?

Or will the new phones use @2x images only and there is nothing like @3x?

我通过制作示例项目进行了测试,所有模拟器似乎都使用@3x 图像,这令人困惑.

I have tested by making a sample project and all simulators seem to use @3x images, this is confusing.

编辑

这里有更多信息

  • 3GS(163 ppi 所以使用普通)
  • 4、4s、5 和 5s(326 ppi,所以我们使用 @2x)
  • 6(326 ppi,所以看起来它会使用@2x)
  • 6 plus(这里是 401 ppi 的混乱)

编辑

根据 Tsob 和 nitin 给出的答案,我在我的项目中添加了 @3x 图像.

Based on Answers given by Tsob and nitin, I added @3x images to my project.

信息编辑

我看到很少有用户对为什么 iPhone 6 使用 @2x 图像即使它具有更高的分辨率感到困惑,原因是

I see few users are confused about why iPhone 6 uses @2x images even though it has higher resolution , the reason is

iPhone 6 的分辨率可能不同,但每像素英寸 (PPI) 的密度相同

iPhone 6 might have different resolution but has same density of per pixel inch (PPI)

  • 分辨率涉及像素的绝对数量.
  • 密度(又称每英寸像素数 - PPI)涉及每英寸像素的相对数量,这在 iPhone 6 和之前的 iPhone 中相同,但在 iPhone 6 plus 中不同.
  • Resolution concerns an absolute number of pixels.
  • Density (aka Pixels per inch - PPI) concerns a relative number of pixels per inch which is same in case of iPhone 6 and previous iPhones , but different in iPhone 6 plus.

查看更多关于此在此线程中

因此 iPhone 6 使用与 iPhone 4、5 和 5S 相同的 @2x 图像,因为它具有相同的 PPI,而 iPhone 6 plus 使用 @3x.

Hence iPhone 6 uses @2x image same as iPhones 4 , 5 and 5S as it has same PPI and iPhone 6 plus uses @3x.

推荐答案

我曾在示例项目中尝试使用标准、@2x 和 @3x 图像,而 iPhone 6+ 模拟器使用 @3x 图像.因此看起来有@3x 图像需要完成(如果模拟器实际上复制了设备的行为).但奇怪的是,所有设备(模拟器)在项目结构上似乎都使用这个@3x 图像,iPhone 4S/iPhone 5 也是如此.
Apple 在潜在的 @3x 结构上缺乏沟通,而他们要求开发人员发布他们的 iOS8 应用程序,这非常令人困惑,尤其是在模拟器上看到这些结果时.

I've tried in a sample project to use standard, @2x and @3x images, and the iPhone 6+ simulator uses the @3x image. So it would seem that there are @3x images to be done (if the simulator actually replicates the device's behavior). But the strange thing is that all devices (simulators) seem to use this @3x image when it's on the project structure, iPhone 4S/iPhone 5 too.
The lack of communication from Apple on a potential @3x structure, while they ask developers to publish their iOS8 apps is quite confusing, especially when seeing those results on simulator.

**来自 Apple 网站的编辑 **:也可以在 Apple 开发者空间的iOS 8 的新功能"部分找到此内容:

**Edit from Apple's Website **: Also found this on the "What's new on iOS 8" section on Apple's developer space :

支持新的屏幕比例iPhone 6 Plus 采用全新的 Retina HD 显示屏,屏幕比例为 3.0.为了在这些设备上提供最佳体验,请添加为此屏幕比例设计的新图稿.在 Xcode 6 中,资产目录可以包含 1x、2x 和 3x 尺寸的图像;只需添加新的图像资产,iOS 就会在 iPhone 6 Plus 上运行时选择正确的资产.iOS 中的图像加载行为也识别 @3x 后缀.

Support for a New Screen Scale The iPhone 6 Plus uses a new Retina HD display with a screen scale of 3.0. To provide the best possible experience on these devices, include new artwork designed for this screen scale. In Xcode 6, asset catalogs can include images at 1x, 2x, and 3x sizes; simply add the new image assets and iOS will choose the correct assets when running on an iPhone 6 Plus. The image loading behavior in iOS also recognizes an @3x suffix.

仍然不明白为什么所有设备似乎都加载了@3x.也许是因为我使用的是常规文件而不是 xcassets ?很快就会尝试.

Still not understanding why all devices seem to load the @3x. Maybe it's because I'm using regular files and not xcassets ? Will try soon.

进一步测试后 好吧,iOS8 似乎对此有发言权.在 iOS 7.1 iPhone 5 模拟器上进行测试时,它正确使用了 @2x 图像.但是当在 iOS 8 上启动它时,它在 iPhone 5 上使用 @3x.不确定这是想要的行为还是 iOS8 GM 或 Xcode 6 模拟器中的错误/错误.

Edit after further testing : Ok it seems that iOS8 has a talk in this. When testing on an iOS 7.1 iPhone 5 simulator, it uses correctly the @2x image. But when launching the same on iOS 8 it uses the @3x on iPhone 5. Not sure if that's a wanted behavior or a mistake/bug in iOS8 GM or simulators in Xcode 6 though.

这篇关于新 iPhone 6 和 6+ 的图像分辨率,添加了@3x 支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆