Thordax
Thordax

Reputation: 1733

How to know simply DPI from PPI information?

I am trying to emulate the size of a Galaxy Note screen, which is 1280 * 800 resolution and 285 ppi. But when i try to enter device configuration on Eclipse for Android, I have to enter xdpi and ydpi values (1280 * 800 ?), not ppi ones. I have the possibility to enter the density, but I only have the choice between : X-High Density, High Density, TV Density, Medium Density, and Low Density. I guess I have to choose X-High Density but how to be sure it is equal to 285 PPI ?

Do you know how to find the dpi informations to enter in order to have the same visualization ?

Thanks in advance !

Upvotes: 0

Views: 1263

Answers (1)

Marc Van Daele
Marc Van Daele

Reputation: 2734

You can compute the xdpi and ydpi

  • xdpi = 800/x-dimension of screen in inches
  • ydpi = 1280/y-dimension of screen in inches

I noticed that the device dimensions are about 3.3" x 5.8" so then (xdpi,ydpi)=(242,220)

From this, we can double check whether this results in the given ppi by sqrt(xdpi^2+ydpi^2) or 327 which is, unfortunately, quite far off of the given 285ppi (and I don't know why right now).

We can scale both xdpi/ydpi with 15% to (210, 190) which results in a ppi of 283. But again, I would like to understand why this is needed.

But for your purpose, I guess that xdpi,ydpi=(210,190) would be a good match

Upvotes: 1

Related Questions