可可点vs像素和PPI [英] Cocoa Point vs Pixel and PPI

查看:108
本文介绍了可可点vs像素和PPI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,关于iOS设备的屏幕分辨率,我基本上有两个问题.

Well, I have basically two questions regarding screen resolution in iOS devices.

1)在iOS文档中的点与像素"部分中,它指出了将坐标作为点传递到框架中,并且一个点不一定对应于屏幕上的一个像素".如下所示: https://developer. apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/WindowsandViews/WindowsandViews.html

1) In iOS documentation, on the Point vs Pixels section, it states the coordinates are passed in to framework as points, and that "One point does not necessarily correspond to one pixel on the screen." as found here: https://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/WindowsandViews/WindowsandViews.html

什么时候不同?到现在为止,我一直假设它们相等并以像素坐标传递.这是一个随设备而异的参数吗?

When they are different? Up until now I was assuming they were equal and passing in pixel coordinates. Is this a parameter that changes from device to device?

2)我对PPI也有些困惑.我知道这在硬件屏幕上的含义(如果10和7"显示器具有相同的像素分辨率,那么由于PPI较高,那么7显示器将具有更好的图像质量.)但是,如果我保存具有72ppi或96甚至326的.png是仅用于打印还是在我的屏幕上视觉上有区别?

2) I'm also a little bit confused about PPI. I know what it means on the hardware screen (if a 10" and a 7" display have the same pixel resolution then the 7" display will have a better image quality since the PPI is higher). But what difference it makes if I save a .png with 72ppi or 96 or even 326? Is it just for printing or does it make any difference visually on my screen?

谢谢

推荐答案

在视网膜设备(iPhone 4、4S或5,iPad 3或4)上,每个点有2个像素.在非视网膜设备上,每个点有1个像素.

On retina devices (iPhone 4, 4S, or 5, and iPad 3 or 4), there are 2 pixels per point. On non-retina devices, there is 1 pixel per point.

除iPhone 5外,所有iPhone的屏幕尺寸均为320x480点.视网膜iPhone的屏幕尺寸为640x960像素(但与非视网膜设备的点尺寸相同).

Except for the iPhone 5, all iPhones have a screen size of 320x480 points. The retina iPhones have a screen size of 640x960 pixels (but the same point size as the non-retina devices).

在iOS中处理图像时,最重要的是像素大小,而不是PPI.只需记住,您的@ 2x图像的宽度和高度应该是普通非视网膜图像的宽度和高度的两倍.

When working with images in iOS, it is the pixel size that matters, not the PPI. Just remember that your @2x images should have twice the width and height of the regular, non-retina images.

这篇关于可可点vs像素和PPI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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