Reputation: 12211
Is it true that we have to use png images for development in iPhone and iPad. What is the advantage we would gain when using png images?
Upvotes: 1
Views: 988
Reputation: 3960
The main advantage of using the PNG images is they are very light weight. And as you know memory management is a very big issue in iPhone and iPad development, that's why we use them. For more detailed information see here.
Upvotes: -1
Reputation: 2747
This similar question goes over this: When to use PNG or JPG in iPhone development?
Pngs are a lossless format so for design, buttons, etc... for iphone/ipad what you see in photoshop (or whatever) is going to be exactly what you get as opposed to jpegs which use compressions.
That post also said that pngs use less processor to be displayed since they are uncompressed.
Upvotes: 1
Reputation: 15849
PNG supports alpha transparency (GIF only support transparent pixels, not semi-transparent) and the quality is good (not like JPEG). It also supports loseless compression.
Upvotes: 1
Reputation: 39512
You dont have to use png. You can use gif, jpeg, and others. If you use png, xcode will optimize them for the iOS loader (changes the byte-order of some data in the png; I'm not clear on this exactly) resulting in faster loading images.
Upvotes: 3
Reputation: 14418
Apple has said that Xcode will optimize PNGs during the build process.
This article explains exactly what it is doing, and why PNGs are preferred over other formats on the iPhone. In other words, you will lose performance by using any other formats, as the conversion must be done at runtime.
http://iphonedevelopment.blogspot.com/2008/10/iphone-optimized-pngs.html
Upvotes: 4