iOS size unit pt, PPI and px conversion relationship

Source: Internet
Author: User

On the Apple iphone 6s screen parameters I believe that everyone will not be unfamiliar, the size of 4.7 inches, 1334 x 750 resolution so that its PPI reached 326

SP and PX Conversion formula: sp*ppi/160 = px
Conclusion:
PX = dp*ppi/160
DP = PX/(ppi/160)
PX = sp*ppi/160
SP = px/(ppi/160)

The DPI and PPI are both density units, not units of measure, and these two are precisely the important denominator in our conversion. Simply understand:

PPI (pixels per inch): Image resolution (number of pixels in an image that is included in each inch)
DPI (dots per inch): Print resolution (the number of points that can be printed in each inch, i.e., print accuracy)
The DPI is primarily used for output, with emphasis on printing devices.

We're talking about PPI and dpi in mobile apps, actually.
iOS size unit pt, PPI and px conversion relationship

Unit:

PT:iOS Development Unit , point, Absolute length, 1pt=1/72 inch.

Ppi:pixels per Inch, that is, the number of pixels each inch has, the pixel density of the screen.

Formula:



Example:

For example, the pixel resolution of IPHONE3GS is 480pxx320px, as shown in the following figure is that the IPHONE3GS has a PPI 163, the physical screen width of about 3 inches, 3*163~480,

So IPHONE3GS resolution is 480*320

Because the physical screen sizes of IPHONE3GS and iphone4 are the same size, their PT is the same. But because iphone4 's realistic pixel is 960pxx640px, it means that each inch displays 326 pixels (just twice times iphone3gs) on the iphone4 screen.






that is, in the same physical length pt length, iphone4 screen pixel density is iphone3gs twice times, so the pixel resolution is iphone3gs twice times.

This is why when we do the design of the iOS client (usually we @2x to design), the development of the picture size of how much PT, converted to be multiplied by 2 reasons (if we do iphone6+ design to the PT number X3) The origin of the.


It's easy to look at the size of the iphone. It can be seen that the iphone's screen density is only 3 kinds, namely

@1x,163ppi (IPHONE3GS)

@2x,326ppi (iphone4, 4s, 5, 5s, 6)

@3x,401ppi (iphone6+)




Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

11.11 Big Sale for Cloud

Get Unbeatable Offers with up to 90% Off,Oct.24-Nov.13 (UTC+8)

Get It Now >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.