Reputation: 633
I understand the need to upgrade your non-retina graphics to retina graphics if the app was originally designed with non-retina graphics. If you aren't converting old apps, is there a reason to make 2 different size graphics? Since retina graphics can scale down but non retina can't scale up, why not just make all graphics with retina dimensions? This seems to save a lot of time (making each graphic 2 sizes / naming each graphic appropriately, etc.) although it may take up a trivial amount of space. Is there something I'm overlooking if I don't make all my iPad and iPhone apps based off retina dimensions only?
Upvotes: 0
Views: 465
Reputation: 1214
Performance is one factor. Also, for small icons, you want pixel perfect images for the screen size. The scaling algorithm on iOS is generically smooth but you want it sharper when you get into small icons.
Upvotes: 0
Reputation: 7410
When creating images for your app, it's much better to lower the resolution prior to exporting it. Images will render better than if you create a .png file, and then resize it.
Imagine a 8px*8px square being scaled down to 4px*4px.
If you reduce your png file, a 2px*2px square will correspond to a single pixel. The resulting color won't be perfect. If you reduce your image prior to exporting it, it will render better.
So, if you create those images yourself, it's better to reduce them manually, and before exporting them.
If you use "already flat" images, wether you or the OS operate this "bad" downscale,you'll have the same result. But if you give the system the non-retina images, your app will run more smoothly as you spare the OS the time to create the low res images.
Upvotes: 0
Reputation: 28727
As Kendall answered, one reason is peformance, but the other is visual quality.
A image designed to retina, when automatically downscaled can become unsharp:
For an image to be pixel sharp it has to be designed for non retina:
This includes not placing lines on fractional coordinates, they would be between to pixels, leading to visualy lower quality.
Upvotes: 0
Reputation: 16089
The problem with only including Retina graphics is that, as you say, the device would have to scale down all of your assets before displaying them. This might well be a negligible impact on your app's performance. The bigger problem is that downscaled graphics look crappy, especially since they're going to be displayed on lower-resolution screens. All of your scaled images are going to look mediocre at best. Maybe you could spend a lot of time developing images that iOS will scale well, but at that point, why not just generate separate image files? It doesn't take much effort to generate 1x assets, and your users will notice the difference.
Upvotes: 0
Reputation: 75058
The main reason is simply performance, if the system has to scale all images down it could impact performance.
Also I'm not sure if the non-retina systems will load an image if only the @2x image is available. That would require some testing in the simulator.
Upvotes: 2