android image size different mdpi, hdpi, xhdpi, xxhdpi ? i have a mdpi image 20*20 how to measure hdpi, xhdpi, xxhdpi how to make other resolution image different screen sizes due to Android having set standard size ?
Asked
Active
Viewed 4,094 times
4
-
3Possible duplicate of [image size (drawable-hdpi/ldpi/mdpi/xhdpi)](http://stackoverflow.com/questions/14381965/image-size-drawable-hdpi-ldpi-mdpi-xhdpi) – camelCaseCoder Mar 29 '16 at 13:25
2 Answers
9
Here is the scale factor list for each density:
- ldpi = 0.75x
- mdpi = 1.0x
- hdpi = 1.5x
- xhdpi = 2.0x
- xxhdpi = 3.0x
- xxxhdpi = 4.0x
So for example, if your mdpi image size is 20x20 then xhdpi size should be 40x40

Dmitri Timofti
- 2,428
- 1
- 22
- 25
-
-
imgWidth * scalefactor, imgHeight * scalefactor -> 20(width),15(height) mdpi(1.0x) would result in 20x2=40(width), 15x2=30(height) xhdpi(2.0x) – Dmitri Timofti Mar 29 '16 at 13:28
1
you can use the following chart
mdpi 20 * 20 pixels
hdpi (mdpi * 1.5) 30 * 30 pixels
xhdpi (mdpi * 2) 40 * 40 pixels
xxhdpi (mdpi * 3) 60 * 60 pixels

Ankit Aggarwal
- 5,317
- 2
- 30
- 53
-
-
-
yes the same rule applies. for each length and width you have to separately multiply with the factor. so it will be 30 * 22 in hdpi, 40 * 30 in xhdpi – Ankit Aggarwal Mar 29 '16 at 13:24