Search code examples
iosimageretina-display

iOS apps - why include both @2x and low-res images?


This has been bugging me for a while. I don't understand why one should include low-res images. If a 3GS, for example, can't find the low-res image, it just uses the @2x version anyway and displays it at it's native resolution. So why add to the filesize of your app by including all the half-res images?


Solution

  • Halley had it right. The system does not automatically downsample @2x images to non-retina size, and it shouldn't. The 3Gs does not have enough memory to load retina images. It will likely choke your app and cause it to exit with an out of memory error.

    The problem gets even worse with the iPad 1. The iPad 1 has very low memory relative to it's screen size, and if you tried to make it load retina sized images, it would choke and die very quickly.

    To scale an image the system has to load it at full size and do a complex scaling operation each time it draws it. It's the worst of all possible worlds - slower, 4x as much memory, and the images don't look as good.