Huang
Huang

Reputation: 1355

What are the side effects of having an application with no retina images?

If you have an app that works fine on non retina devices, and then you deploy it on a retina device, without providing the requisite @2x images, what side effects could occur? high memory usage? crashing of the application?

Upvotes: 1

Views: 182

Answers (3)

Marcus Adams
Marcus Adams

Reputation: 53830

If you do not include @2x images, then the device will automatically stretch the image on a retina device to take up the same room (enlarge the image).

The scaling method that UIKit uses does not do any interpolation. Instead, it merely doubles the size of every pixel ("nearest neighbor" scaling). For images of squares with hard edges, that works fine. However, for photos or most artwork, the image ends up looking very pixelated (has artifacts).

Scaling the images up on a retina device is not performance intensive because of the simple scaling method that is employed. It is not likely to affect performance, only image quality.

If you include only high resolution images, they are not automatically scaled down for the non-retina device. Instead, for an UIImageView, for instance, you would set the view mode to Scale to Fill, so that the image scales down to fit the frame. However, again, UIKit uses the nearest neighbor, but when scaling down, artifacts are less noticeable.

The newer, retina devices are more performant, so they are able to handle high resolution images at the same speed as non-retina devices can handle the low resolution images, and scaling images up is trivial for them. However, older non-retina devices will simply be slower with high-resolution images which require more memory and more graphics power, especially since it has to scale them down as well.

This is very noticeable if you have high resolution images in a UITableView. Your retina device will scroll the table very smoothly, whereas you will notice some jitter on the non-retina device. It will not crash, it just won't be smooth. If the user experience is too bad, your app could be rejected. For static, non-moving images, there is unlikely to be much noticeable performance difference.

If you have room in your bundle, you should include both retina and non-retina images. Even if you simply double the image size in a nice photo editor like Photoshop to create your @2x images, the images will be of much nicer quality than what UIKit produces.

Remember that if your zipped app bundle is over 50 MB, it can only be downloaded via WiFi from the App Store. PNGs and JPEGs do not compress much since they are already compressed. That is one reason why you might choose to only include high resolution images (to keep the size of your app bundle down, especially for a universal app, where you might end up having 4 sets of images).

Upvotes: 0

Rok Jarc
Rok Jarc

Reputation: 18865

Of course you can provide only retina or even only non-retina images.

We did some testing on this matter a few month ago.

Only non-retina images resulted - as expected - in poor graphics. Even an non-trained eye could notice the blurrines.

Only retina images: it works. But memory footprint is bigger (for non-retina devices that would otherwise load non-retina images) and some lag could be noticed. Though we had to measure it to be sure.

To answer your question: zenith provided the answer. If you only provide non-retina images the graphics on retina devices will be blurry, but no low-memory condition could emerge because of this.

EDIT:

Unless you are doing some kind of research on graphics capabilities of different iOS devices i'd strongly suggest to provide both types of images: retina and non-retina.

If your designer is giving you hard time because of this you can do few things:

  • get a new designer
  • provide him some kind of tool to make his job easier: Unretiner for example

Upvotes: 0

dsgriffin
dsgriffin

Reputation: 68596

No, the events you mentioned will not occur. However, obviously your images will look terrible as they will not scale properly (therefore they will be pixelated and incorrect sizes etc.).

There isn't any point in not using retina images - all you have to do is add @2x to the images and double the image size, and they will scale correctly for both non-retina and retina display.

Upvotes: 1

Related Questions