Reputation: 51908
So I'm making a universal app (iphone3gs/iphone4/ipad/)... But I have a question about images.
Say we have an image of a smiley face...
Would you have 3 separate images (each saved with a different width/heights)
for all devices i.e.:
smiley-iPad.png (for ipad)
smiley.png (for iphone 3gs)
[email protected] (for iphone 4)
or would you just have one image: smiley.png (that is saved in high resolution i.e., large width/height and then scaled with interface builder)
seems like that latter would save alot of work, what are your thoughts on this, which is better?
Upvotes: 4
Views: 1049
Reputation: 2901
It's not just a problem about scaling images.
If you use "a lot" of images, the main problem will be the memory used. For an iPhone 4, using an image 640*960px to display a background won't be a problem. But using the same image for an iPhone 1 or iPhone 3G is a bit too much. Especially when you have more than one image ^^
So I advise the first solution (the one I'm using for my Apps ;-))
Upvotes: 0
Reputation: 4381
The latter would save work but would be slower on the 3GS as it would have to scale the image before displaying it. Depending on your application this may or may not be a problem. There may be other cases as well where you want a completely different image for ipad as with a larger screen space there is more room for detail.
Upvotes: 1