Question

I'm not sure if this question is not directly related to Android Programming, but I'm sure you'll be able to help me.

I've the following tool:

enter image description here

What it does, is from a provided image, creates output for diferent densities. However, you've to set how "big" the original image is.

My original image is 1535x2048.

So, how can I know which density this image is?

I thought DPI was directly related to the screen, not something "global" like this tool is asking.

Any tips are highly appreciated.

Thanks.

Was it helpful?

Solution

That's actually quite simple, but easy to get lost.

This tool is a bit flaw. If it was more user friendly, it would ask which size (in DP) do you want your image to be, and that's all.

But what it is actually asking you, is that the image you provide to it, already be in the correct size for one screen density, so all it does is apply the same scaling factor to any image:

LDPI - MDPI - HDPI - XHDPI - XXHDPI
0.75    1     1.5      2       3

So let's say you're putting an image that is to be 200dp wide. To achieve best results, what you want to do is to put the image in this tool already with 600px wide and select it as be an XXHDPI, and the tool will scale it down.

ps.: that tool apparently is for 9-patch only, so be aware.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top