Reputation: 769
So I need to create images to be part of my app that I'm making. I haven't found the answer anywhere.
What I am wondering is...
If I created an image that is to be displayed on Activity1, then what image size in PIXELS should I created the initial image at?
The initial image would then be resized to their corresponding DPI to work well on Android phones.
I may be doing this wrong in creating images so they don't lose their quality, any ideas?
If I am doing this wrong, then please can someone advise on the best practice on creating Android images in pixels and then converting to DPI later after the initial image?
Thank you! :)
EDIT: This question is different because I'm mainly talking about keeping image quality by making the image big first and then downsizing.
Upvotes: 1
Views: 1892
Reputation: 1293
To generate image for Android device you can follow this as I do: To create alternative bitmap drawables for different densities, you should follow the 3:4:6:8:12:16 scaling ratio between the six generalized densities. For example, if you have a bitmap drawable that's 48x48 pixels for medium-density screens, all the different sizes should be:
Or,
Image resolution and DPI are tightly coupled each other. There is a 3:4:6:8 scaling ratio in drawable size by DPI.
For example if a 100x100 image is a baseline (MDPI),
and so on.
Upvotes: 1
Reputation: 2735
You have to create six generalized size image densities:
For more detail check out this link
Upvotes: 1