Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating XHDPI, HDPI, MDPI, LDPI images in Photoshop for Android [closed]

When we are making images for android app, I wanted to know which way is correct for making XHDPI, HDPI, MDPI, LDPI. (both may be wrong)

The first way is get the original image, open in photoshop, change the DPI to 320 (the original has 326 DPI) then save the image as XHDPI, then change the DPI to 240 for HDPI, 160 for MDPI, 120 for LDPI.

Second way, open the original image, then half the image size (without changing the DPI) and that would be MDPI, resize the image to 0.75 of MDPI's size and that would be LDPI, resize it to 1.5 of MDPI's size and that would be HDPI.

So basically, first way is change the DPI and photoshop automatically resizes the image, the second way is keep the dpi same and manually resize the image.

If both ways are wrong, please let me know the correct way to create these images in photoshop.

like image 860
ThreeRedRubies Avatar asked May 08 '13 10:05

ThreeRedRubies


People also ask

Is there a way to create Xxhdpi Xhdpi Hdpi Mdpi and LDPI Drawables from a large scale image?

Option #1: Just ship the -xxhdpi drawables and let Android downsample them for you at runtime (downside: will only work on fairly recent devices, where -xxhdpi is known). Option #2: Use Android Asset Studio to downsample them for you. Option #3: Automate the process within a graphics editor, per ssantos' answer.

What is drawable Hdpi in Android?

these are image folders for different densities. hdpi images for the Android Broad Screen set or Android Phones with the Higher resolution. ldpi Lower images quality supported by the earlier sets of the android. mdpi for medium images support. xhdi devices with maximum resolution.


1 Answers

Sorry, i'm a little bit late but this can help other people too.

I use the free plugin "Cut&Slice me". It's very easy to use.

Just click on the layer you want to export and the plugin automatically create folders (drawable-xhdpi, drawable-hdpi...) and put them on.

I hope this can help you ;)

like image 164
Kevin Machado Avatar answered Oct 13 '22 15:10

Kevin Machado