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

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

问题描述

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



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




  • 正常(50 X 50)

  • @ 2x - Retina(100 X 100)

  • @ 3x - Retina HD(150 X 150)



或者新手机仅使用@ 2x图像而且没有像@ 3x那样的东西吗?



<我已经通过制作样本项目进行测试,并且所有模拟器似乎都使用@ 3x图像,这很令人困惑。



编辑



这是一些更多的信息




  • 3GS(163 ppi所以使用普通)

  • 4,4s,5和5s(326 ppi所以我们使用@ 2x)

  • 6(326 ppi所以好像它会使用@ 2x)

  • 6 plus(这里有401 ppi的混乱)



编辑



根据Tsob和nitin给出的答案,我将@ 3x图像添加到我的项目中。



信息编辑



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



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




  • 分辨率与绝对像素数有关。

  • 密度(又称每英寸像素数 - PPI)涉及每英寸的相对像素数,这与iPhone 6和之前的iPhone相同,但在iPhone 6 plus中则不同。



查看更多相关信息此线程中的这个



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

解决方案

我试过在示例项目中使用标准,@ 2x和@ 3x图像,iPhone 6+模拟器使用@ 3x图像。所以似乎要完成@ 3x图像(如果模拟器实际上复制了设备的行为)。
但奇怪的是所有设备(模拟器)似乎都使用这个@ 3x图像,当它在项目结构上时,iPhone 4S / iPhone 5也是如此。

苹果公司缺乏沟通一个潜在的@ 3x结构,虽然他们要求开发人员发布他们的iOS8应用程序是相当混乱的,尤其是在模拟器上看到这些结果时。



**从Apple的网站编辑**:在Apple的开发者空间的iOS 8上有什么新功能部分中也可以找到:


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


仍然无法理解为什么所有设备似乎都加载@ 3x。也许是因为我使用常规文件而不是xcassets?将尽快尝试。



进一步测试后编辑:好吧看来iOS8在这方面有一个话题。在iOS 7.1 iPhone 5模拟器上进行测试时,它正确使用了@ 2x图像。但是当在iOS 8上启动它时,它在iPhone 5上使用@ 3x.
不确定这是不是想要的行为,也不是iOS8 GM中的错误/错误或Xcode 6中的模拟器。


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?

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?

  • Normal (50 X 50)
  • @2x - Retina (100 X 100)
  • @3x - Retina HD (150 X 150)

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

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

Edit

Here is some more info

  • 3GS ( 163 ppi so use Normal)
  • 4, 4s, 5 and 5s (326 ppi so we use @2x)
  • 6 (326 ppi so it seems like it will use @2x)
  • 6 plus (401 ppi here lies the confusion )

Edit

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

Informational Edit

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

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

  • 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.

Check more about this here in this thread

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

解决方案

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.

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

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.

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.

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天全站免登陆