user899352
user899352

Reputation: 151

iPhone/iPad handling of large number of images

I have 2 iOS apps that have been in the market, 3 years on iPhone, 2 years on iPad HD version. The apps are a popular reference tool in the medical field. They are both comprised of 1100+ images. The current app size is roughly 52mb.

Approximately 400 images will be redone. They are currently jpg and low resolution. The replacements will be png, with higher resolution.

I'm uncertain on pixel size for these images. If they are in the 280x280 range, each file is about 100k, if in the 560x560 range, each file is almost 400k.

So I'd be looking at additional 40mb for the smaller images and 160mb for the larger.

There are plans for another 400+ images in the near future. So, I'm somewhat concerned with final app size.

If I went with the larger size for Retina devices, can I downsize for non-Retina devices? If I supplied both sizes, image.png and [email protected], that would be 200mb just for these images.

I'm a little uncertain on how to manage these with regards to their individual size and, more importantly, their total size.

Any comments or suggestions are welcomed and would be helpful.

TIA,

jb

Upvotes: 1

Views: 217

Answers (1)

brynbodayle
brynbodayle

Reputation: 6626

Here are a few options you have:

1. Downsizing Retina Images

I would not recommended downsizing retina images for the non-retina devices. This produces non-optimal performance and makes the images look bad. Your still loading in all the pixels of a retina image, but only displaying 1/4 of them.

2. Bundling All of the Images

Honestly for a medical reference app, I think it would be understandable if your app size would be quite large. I wouldn't imagine people would need to download this app over 3G or LTE. Your users understand this is a large database app which provides high resolution images, thus they should be okay with the large app size via this method.

3. Hosting the Images on a Web Service

Another alternative would be to host the images on a server, allowing them to be downloaded individually as needed, or in bundles. I think your users would prefer being able to fully use the app without internet connection rather than having a smaller app size.

4. Alternative Image Loading

This approach takes a bit of work and could be a little risky. You could bundle only 2x versions of your images into the app. Then on App launch you could force the user to wait until you resize all the images to their 1x counterparts and save them off to the disk. Then you could create an image loading convenience method which loads a UIImage from either disk or the app bundle based on whether or not it needs a retina image.


I definitely recommend option 2 for your purposes. I only mentioned the others to be thorough.

Upvotes: 1

Related Questions