RK-
RK-

Reputation: 12211

Why extensive use of png images in iPhone development?

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

Answers (5)

Sudhanshu
Sudhanshu

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

joshcartme
joshcartme

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

seppo0010
seppo0010

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

TomSwift
TomSwift

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

mfanto
mfanto

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

Related Questions