Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining image sizes for multiple android screen sizes/densities

Tags:

I've been reviewing the Supporting Multiple Screens documentation on the Android and I just need some additional clarification...

It's my understanding that designing three unique interfaces (ldpi, mdpi, and hdpi) would be the best way to go about supporting all the potential android screens with minimal scaling/distortion.

Yes, I know there are similar questions posted, however... If I create an image for the benchmark mdpi (let's say my image is 300x210, just for example) how to I determine what size I will need to recreate that image at ldpi & hdpi? This post as well as a google search leads me to believe that ldpi is just 75% of the mdpi image, and the hdpi is 150% of the mdpi image. Is this accurate?

like image 291
user2393462435 Avatar asked Apr 22 '10 13:04

user2393462435


People also ask

What is 4x pixel density?

In 4x screen (~640 DPI) it takes four times as many pixels (352 x 144 PX) to fill the area of 88 x 36 density-independent-pixels.


1 Answers

-ldpi is ~120dpi, -mdpi is ~160dpi, -hdpi is ~240dpi.

So, a 320px wide image is 2" in -mdpi. If you want a 2" image on -ldpi, you want it to be 240px (=75% of original). If you want a 2" picture on -hdpi, you need 480px (=150% of original).

Hence, your analysis is accurate.

like image 146
CommonsWare Avatar answered Oct 15 '22 08:10

CommonsWare