How To Resize and Copy Images Files To Android Drawable Folders Quickly

Contents

0
(0)

I’m not a full time Android developer. I make Android apps such as this. Android studio is great and I can develop my ideas quickly. However, there is one thing I don’t like is the way I have to deal with images. Every time I need to add an icon to my app, I need to resize that image to the following sizes:

  1. 144 x 144
  2. 96 x 96
  3. 72 x 72
  4. 48 x48

And put them in the following folders, respectively:

  1. drawable-xxhdpi
  2. drawable-xhdpi
  3. drawable-hdpi
  4. drawable-mdpi

The task is boring and tedious. So, I decided to make a tool to make this task less painful.

How does the tool work?

Let’s say you want to use a new icon like this in your app:

How To Resize and Copy Images Files To Android Drawable Folders Quickly 7

Now, instead of resize and copy the file 4 times, you just need to open the tool:

How To Resize and Copy Images Files To Android Drawable Folders Quickly 8

The first step is to select your /res folder which contains the drawable-..dpi folders. The Directory Chooser will make this step simple an easy.

Now, look at the checkboxes, they are self-explanatory. If for some reasons, you don’t want to copy the image to a particular folder, simply uncheck the checkbox in front of it.

Then, click on select Image to select your image. The image should be square and have resolution at lest 144 x 144 pixel to avoid pixelation.

If your image is in JPG format, you select JPG, if it is PNG, select PNG.

How To Resize and Copy Images Files To Android Drawable Folders Quickly 9

After that, you click on open to complete the process.

And that’s all. You don’t need to open your image editor to resize the images. With less time spent, you have your images in all drawable folders.

Further features

I made this tool out of my need. I think there are more improvements to be made. Here are some ideas:

  • Let user set the resolution (instead of fixed size as of now)
  • Let user select more folders, even add folders outside the /res folder

The app is free and the repo is open on github. You can download the source and the app here

I hope the app can save you some precious time. Let me know if you have any suggestions.

 

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.


Leave a Reply

Your email address will not be published. Required fields are marked *