S
S
Sergey Shilovsky2021-03-26 22:34:28
Android
Sergey Shilovsky, 2021-03-26 22:34:28

How to prepare pictures for Android?

Good day.
Essence of the question:
There is an original picture in high resolution (Approx. 3000x2000 pixels).
From this image, I need to make a small icon, 24dp x 16dp in size.

As far as I understand, 6 main resources need to be prepared: ldpi (0.75x), mdpi(1x), hdpi(1.5x), xhdpi(2x), xxhdpi(3x), xxxhdpi(4x).

Did I understand correctly that I need to take the following calculations with the pens, and then squeeze the picture:

ldpi: 24*0.75 & 16*0.75 = 18x12
mdpi: 24*1    & 16*1    = 24x16
hdpi: 24*1.5  & 16*1.5  = 36x24
...


Am I doing the right thing at all?

I also found a service on the net that allows you to automatically cut a picture into different dpi, but you still have to prepare a picture for xxxhdpi. Are there any other good tools? Ideally, you would upload the original image and say what size it should be at mdpi, and then everything is on its own.

What image size to use for drawable without qualifiers?

And a slightly offtopic question.
If it was necessary to specify its size in the file name, what would be better: drawable_24dp or drawable_16dp?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Shilovsky, 2021-03-30
@First_Spectr

Because no one knows, I'll share what I dug up: I
found another cool service on the net . It's just like I wanted: we load the image in any resolution, we say what dp we need it in the application, and at the output we get a slice of 5 resources (without ldpi, which is most likely not used anywhere).
You can not use a picture for drawable without qualifiers at all.
The output resources are square, so the offtopic question is irrelevant.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question