iPhone 4(视网膜)屏幕的尺寸是多少
我有一张应在 iPhone 应用程序中使用的 PNG 图片,但首先,我必须为其提供 iPhone 4 视网膜屏幕的尺寸。有谁知道它的尺寸是多少或者如何做到这一点?
I have a PNG picture which I should use in my iPhone application, but first of all, I have to give it the dimensions of an iPhone 4 retina screen. Does any one know what could it be its dimensions or how to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
iPhone 4 上的视网膜显示屏的像素数量是旧款 iPhone 的两倍。因此,iPhone 4 屏幕的完整尺寸(以像素为单位)为 640x960。
在 Photoshop 中,您可以通过从“图像”菜单更改图像大小属性来快速调整任何图像的大小。如果您不想损失质量,我建议您从所有视网膜图像开始,并将非视网膜显示器的图像减半。相反的做法会降低你的质量。
如果您想使用专为 iPhone 4 视网膜显示屏设计的图像,您需要在资源文件夹中同时拥有两张图片,一张用于普通 iPhone 屏幕 (320x480),另一张用于视网膜图像您的 Xcode 项目。对这些图像使用相同的名称,但在视网膜图像末尾附加“@2x”。
因此,如果您有“background.png”,它将变成“[电子邮件受保护]”,iOS 将足够聪明,可以为正确类型的屏幕使用正确的图像。
The retina display on the iPhone 4 has the double amount of pixels than that of an older iPhone. So the complete size of an iPhone 4 screen in pixels is 640x960.
In photoshop you can quickly resize any image by changing the image size property from the Image menu. If you don't want to lose quality I suggest you start with all retina images and halve them for the non retina displays. Doing it the opposite way will decrease your quality.
If you want to use an image designed for the iPhone 4 retina display you'll want to have both pictures, one for the normal iPhone screen (320x480) and one for the retina images, in your resource's folder of your Xcode project. Use the same name for those images but append "@2x" at the end of the retina images.
So if you have a "background.png" it will become "[email protected]" and iOS will be smart enough to use the correct image for the correct type of screen.
在 72 dpi 下,它应该是 640 像素 x 960 像素。
At 72 dpi, it should be 640px by 960px.
iPhone4屏幕分辨率为960x640
iPhone4 screen resolution is 960x640