what is display's logical resolution?
Asked Answered
C

3

21

I encountered this concept: device pixel ration, some said it is the ratio between physical pixels and logical pixels.

For example iPhone has:

  • Physical resolution: 960 x 640
  • Logical resolution: 480 x 320

so does it mean that the height of each physical pixel is the screen height/960 ? And the height of each logical pixel is equal to twice the height of the Physical pixel?

Campion answered 31/7, 2014 at 12:10 Comment(4)
On that post, they say the opposite: #8786143Whodunit
The problem is those pesky new high resolution screens -- or, rather, legacy web pages (and to a lesser extent, applications) that specify positions and sizes in px pixels. When taken literally, every web page would appear way too small. So Apple invented the "logical pixel" measurement unit, whereas "physical pixels" are the ones you would see. (If only they weren't so darn small.)Typhoon
@Typhoon thanks! How about the device independent pixels, is it something similar to logical pixel?Campion
@Typhoon LOL, I got it from msdn.microsoft.com/en-us/library/windows/desktop/… , and I still don't quite get it after reading the article...Campion
P
10

We can say that 4 physical pixels make 1 logical pixel ;-)

In other words: most recent retina displays have much more pixels than original iPhone, but to maintain compatibility and "visual size" software use 4 physical pixel to render a unique logical pixel.

Pique answered 31/7, 2014 at 12:13 Comment(0)
P
4

You can take a look at the site below:

http://www.iosres.com

For iPhone 4s logical screen resolution is half of the actual resolution (not include in the site above).

Paisano answered 7/3, 2015 at 13:40 Comment(2)
more Apple models are available if you click on Filter > AllRadiobiology
That website appears to be down, but this still works: ios-resolution.comEndogen
B
1

This article refers to what you call logical pixels as points on iPhone and independent pixels (DP) on Android.

It provides formulas on how to convert logical pixels to physical ones.

iOS:

physical pixels = points * DPI / 163

Android:

physical pixels = independent pixels * DPI / 163

DPI (aka PPI) is a Dot Per Inch or Pixel Per Inch is the number of physical pixels per inch.

Physical screen resolution and PPI can be easily obtained from sites like GSMArena. But as developers, we are more interested in logical resolution, and especially logical width.

Let's calculate the logical width for iPhone 14. Its physical resolution and PPI are 1170 x 2532 and 460 respectively:

logical width = 1170 * 163 / 460 = 415

For Samsung S23 (1440 x 3088 and 500 ppi):

logical width = 1440 * 160 / 500 = 460

For iPhone 5 (640 x 1136 and 326)

 logical width = 640 * 163 / 326 = 320
Buke answered 16/6, 2023 at 23:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.