How to make different versions of an image for different screen densities? [duplicate]

0

I have an image that will be placed inside my app (just an example), how can I do a hdpi , xhdpi , xxhdpi , etc version of it? I know I should put in their folders, but when I only have one image how can I make these different versions?

    
asked by anonymous 28.11.2017 / 19:41

1 answer

2

Do the download of a program called Resizer , it is a .jar that resizes images for you to Android sizes. Usually we generate the image with the largest size xxxhdi and resize it to the smaller sizes, this avoids distortion.

But the best option is to generate the vector images and using Android Studio > Vector Asset. It generates for you XMLs with the dimensions of the images for all sizes. This reduces the size of your project.

    
28.11.2017 / 22:26