How do I convert ppi into dpi for Android images?

Viewed 33147

I have started making graphics for my Android app using Adobe Photoshop. But I am unable to proceed, as the resolution in Photoshop is set in pixels per inch where as the official Google documentation says Android will require images set in dpi. I have searched the web for the conversion between the two but never ended up with any proper formula.

I know that the Android documentation describes the relation as px = dp*dpi/160. But my problem is that if I know dpi where do I get the value of dp to be used in this calculation? Or is there any assumption about the value of dp? I am confused.

5 Answers

As the resolution in Photoshop is set in pixels per inch where as the official Google documentation says Android will require images set in dpi.

The same on all devices so it will do scaling based on the number of pixels it computes in that formula.

Related