Is there a way to get Eclipse to automatically re-size images and put them in the appropriate drawable folders? When you add an image for the icon when you first create an Android project, it automatically re-sizes the icon and puts them in the appropriate folders. I know you're meant to scale images using a 3:4:6:8 scaling ratio (http://developer.android.com/guide/practices/screens_support.html). I'm wondering if there is a way that Eclipse does this automatically for images?
-
1You could resize your images programmatically: http://stackoverflow.com/questions/13684947/resize-image-in-android-drawable Also take a look at this link: http://stackoverflow.com/questions/10300979/should-i-create-resized-images-for-all-drawable-folders-ldpi-mdpi-hdpi-if-the – Bram Oct 13 '13 at 15:42
-
I would be interested to know this, too. Although a bit late for me, as I ended up doing it manually. – TEK Oct 13 '13 at 15:42
-
2there are also some external tools that are able to do this: http://code.google.com/p/9patch-resizer/ – Bram Oct 13 '13 at 15:45
-
Cheers for the help. I just thought there might be a way to do this automatically in Eclipse as it seems a bit tedious if you are using a lot of images. – Michael Oct 13 '13 at 16:45
-
I ended up uploading my images to http://android-ui-utils.googlecode.com/hg/asset-studio/dist/nine-patches.html and converting them to nine-patches. It automatically put them into the necessary folders. Then I could merge the folders and it was relatively efficient. – Michael Oct 22 '13 at 01:14
3 Answers
For re-size icons, right click select New/Other… or press Ctrl+N, select Android Icon Set, the default name for icons is ic_launcher, click Next, in Foreground select Image and Browser that image like to put as icon and is re-sized automatically

- 21
- 2
Is there a way to get Eclipse to automatically re-size images and put them in the appropriate drawable folders?
NO, until now, you have to create your own resources defined for every "Screen Density", tools like android_img_resizer will work but can´t support all densities, what if you need resources with mhdpi or tvdpi density.
More info:
Supporting Multiple Screens - Using configuration qualifiers

- 124,308
- 23
- 334
- 268
For re-sizing the images in bulk i will recommend you this tool https://github.com/bearstouch/android_img_resizer . its easy to install and it support the new resolutions (xxxhdpi,xxhdpi) as the base image.Check it out.

- 847
- 8
- 8