Search code examples
androidiosandroid-imagescreen-resolution

Why do we need multiple versions of images in android and IOS?


I am working with images in IOS. The project has same images with 3 different resolutions - 1x, 2x and 3x. The app picks up the required version by itself, depending on the screen resolution of the phone. i have few questions regarding this.

  1. How does the app picks up the best suitable version?
  2. Why don't we keep the images with the highest resolutions, instead of keeping multiple version?
  3. Does applying high resolution images to a low resolution device affects the clarity of image?

Even in android, we do the same. We have multiple versions of the same image. So, these questions applies to android as well.


Solution

  • We need different size images so that OS loads particular image size that is required at that time, Smaller images reduces memory usage. It leads better efficiency. If your app uses less memory, it also means more apps can occupy memory simultaneously, faster multitasking. Phones with low pixel density are usually the old phones with less memory, so that's why giving a low resolution option for those phones makes the user experience more flexible.