iPhone Image Resources, ICO vs PNG, app bundle filesize
- by Jasarien
My application has a collection of around 1940 icons that are used throughout.
They're currently in ICO and new images provided to me come in ICO format too. I have noticed that they contain a 16x16 and 32x32 representation of each icon in one file.
Each file is roughly 4KB in filesize (as reported by finder, but ls reports that they vary from being ~1000 bytes to 5000 bytes)
A very small number of these icons only contain the 32x32 representation, and as a result are only around 700 bytes in size.
Currently I am bundling these icons with my application and they are inflating the size of the app a bit more than I would like.
Altogether, the images total just about 25.5MB. Xcode must do some kind of compression because the resulting app bundle is about 12.4MB. Compressing this further into a ZIP (as it would be when submitted to the App Store), results in a final file of 5.8MB.
I'm aware that the maximum limit for over the air App Store downloads has been raised to 20MB since the introduction of the iPad (I'm not sure if that extends to iPhone apps as well as iPad apps though, if not the limit would be 10MB).
My worry is that new icons are going to be added (sometimes up to 10 icons per week), and will continue to inflate the app bundle over time.
What is the best way to distribute these icons with my app?
Things I've tried and not had much success with:
Converting the icons from ICO to PNG:
I tried this in the hopes that the pngcrush utility would help out with the filesize. But it appears that it doesn't make much of a difference between a normal PNG and a crushed png (I believe it just optimises the image for display on the iPhone's GPU rather than compress it's size). Also in going from ICO to PNG actually increased the size of the icon file...
Zipping the images, and then uncompressing them on first run.
While this did reduce the overall image sizes, I found that the effort needed to unzip them, copy them to the documents folder and ensure that duplication doesn't happen on upgrades was too much hassle to be worth the benefit. Also, on original and 3G iPhones unzipping and copying around 25MB of images takes too long and creates a bad experience...
Things I've considered but not yet tried:
Instead of distributing the icons within the app bundle, host them online, and download each icon on demand (it depends on the user's data as to which icons will actually be displayed and when).
Issues with this is that bandwidth costs money, and image downloads will be bandwidth intensive. However, my app currently has a small userbase of around 5,500 users (of which I estimate around 1500 to be active based on Flurry stats), and I have a huge unused bandwidth allowance with my current hosting package.
So I'm open to thoughts on how to solve this tricky issue.