Reputation: 1476
We know that we should provide normal size image and @2x size image for a iphone/ipad app. But providing double size for one image is a boring thing.
I've do some test, if there is only the @2x image, if needed, system will automatically shrink the @2x image to normal size. So in this situation, the none retina iphone/ipad won't look weird.
I'm wondering can we just provide @2x images and let system shrink them to get smaller ones ? And is it allowed by apple?
Thanks.
Edit:
I've realized it will cause memory issue on old device.
Thanks again.
Upvotes: 16
Views: 3768
Reputation: 52227
Apple says you have to provide both. On guessing under what circumstance it is acceptable or not we can spent days — at the end it is like reading the cards, and some random Apple guy will decide on how he interpreted the guidelines.
If the task of shrinking the images manually is too boring for you, why don't you create a tool/script to do it automatically for you.
Your statement, that there is no increase of usage can't be true. The image data is stored in memory as raw data. with up to four bytes per pixel. Retina version images must use about 4 time more memory.
Upvotes: 9
Reputation: 7114
If you are creating an iPhone only app targeting iOS 7.0 and above, there is no reason to provide non-retina images since the only iPhone/iPod models that can run iOS 7 or higher (iPhone 4 or 5th gen iPod Touch and above) have a retina display.
There are two iPad models without a retina display that can run iOS 7.0, the iPad 2 and the original iPad Mini. Note that the iPad 2 stopped production in early 2014. If you are creating an iPad app or Universal app targeting iOS 7 and above then these are the only two non-retina devices that could run your app.
Upvotes: 2
Reputation: 69469
I don't think all Apple will reject your app. But it's not a good idea.
Since the non retina devices have less memory to work with, loading all these big images in memory could really make you app a memory hog. This could make your app crash on lowmemory warnings.
You can easily resize the @2x
images to half there size with a simple automator script. There is no need to do it by hand if you really wan't to.
Upvotes: 11
Reputation: 143
we just provide @2x images in ours app, and Apple didn't reject the app.
Upvotes: 0
Reputation: 26177
If application footprint is a major issue for you, then this route is one that you can take, it will cost both CPU and memory space increases (memory being about 4x as much) on older devices. However, if you load your own UIImages (subclassing UIImage) so that it loads on older devices to scale the raw image before returning the end result, then only CPU will take a hit.
Upvotes: 2
Reputation: 21
Yes, because iphone need to load the @2x image before shrinking, that will use 4 time more memory. So it's not a recommended way.
Upvotes: 1
Reputation: 18865
+1 for an interesting question.
But: if you're considering this to reduce the size of your app that means that you have a lot of images in your app. In that case: don't do it since you're gonna put a lot of extra load on older devices (tested).
For apps with less graphics it would be ok but there it makes no sense.
So it's actually a bad idea from any point of view.
And since you're already considering to create all @2x images: you can simply use Unretiner to convert all those images to 'normal' size and you're good to go.
Upvotes: 5
Reputation: 3667
It's not allowed by apple. We must name the image as imagename.png and [email protected].
You can refer Drawing and Printing guide for iOS.
Upvotes: 0