Image sizes and mobile devices and dpi

This is a question regarding images and their sizes for mobile devices.

So, suppose I need a full screen image for mobile devices. I assume that the screen here is 320 * 480, which seems consistent.

When I make an image in Photoshop or MS Paint or something else, I can choose pixels / inch (well, maybe not in paint, but you get my drift). The default value is 72 pixels per inch, is it always supported?

Some devices have a higher dpi - I think the "default" is 160 dpi - so for a device that, say, 240 dpi, to display my same image, I:

  • Enlarge the image from 320 * 480 to 480 * 640 (e.g. size = oldSize * 240/160) Or
  • Go to my image and change the pixel / inch to 72 * 240/160?

Given that Android has these sizes:

xlarge screens are at least 960dp x 720dp large screens are at least 640dp x 480dp normal screens are at least 470dp x 320dp small screens are at least 426dp x 320dp 

(From this http://developer.android.com/guide/practices/screens_support.html )

I understand that by scaling my images up / down and shuffling them to the right place, I can get compatibility between devices.

Then, instead of increasing the size of the images, is it better to just make a really large image and compress it as needed?

For iPads and iPhones, this is exactly the same question, just different numbers! Phones are 320x480, Retina is 640x960, iPad is 1024x768, and Retina is four times larger.

So do images increase or pixels / inches increase in Photoshop?

I think in the end I ask:
What are the recommended pixels / inches in Photoshop for an image?
Does this number change or resize the image?
Assuming images for Android, should the image size in h, m, l folders be the minimum value in the Android specifications or just below the maximum?

+4
source share
2 answers

The requirement of a bitmap is similar to preparing graphics for printing compared to a network. If you have experience with printing, you know that an image with 72 PPI will look very uneven and blurry when scaling and printing. Instead, you will need to remake the image as a vector image or use a high-resolution photo, and then set the file resolution to about 300 PPI to print without loss of image quality. The screen density for Android works similarly, except that the resolution of the files did not change, only the size of the images (that is, the standard 72 PPI ).

Do not increase the resolution in Photoshop or gimp to change the image in 72ppi only.

just scale the image from the baseline ie mdpi = 1.

 75 Γ— 75 for low-density screens (ie Γ—0.75); 100 Γ— 100 for medium-density screens (our baseline); 133 x 133 fpr TVDPI (1.33)(no need to supply graphics android will auto scale from hdpi) 213/160=1.33125 150 Γ— 150 for high-density screens (Γ—1.5); 200 Γ— 200 for extra high-density screens (Γ—2.0). 
+4
source

I also found this interesting discussion of the whole ppi issue:

The β€œdpi myth” , which says that β€œppi” is an inherently bad question, since an image of 300 px * 100 px by 72 dpi has the same pixels as 300 px * 100 px at 144 dpi.

Thus, when designing for the Internet, setting the pixel size is all that is important - dpi can be 144 or 1 or one billion, it will not affect how the computer displays the image.

0
source

Source: https://habr.com/ru/post/1440528/


All Articles