views:

106

answers:

2

I 'd like to prepare my PNGs for the best optimization, so I can get the best image quality (lossless if possible) and the smallest size.

From what I understand, I should use: PNG, 72 dpi, RGB, but what else?

Here is what we find in the iPhone HIG:

Note:*The standard bit depth for icons and images is 24 bits (8 bits each for red, green, and blue), plus an 8-bit alpha channel. The PNG format is recommended, because it preserves color depth and supports an embedded alpha channel.

I guess this mean we should save the image as PNG 24 and create them in 8 bits mode? But I also read about 32 bits for best quality ?

The interlacing scheme (witch add to the file size) allows for the PNGs to display faster. Does this applies to the iPhone?

Thanks.

A: 

For my background app I am using JPEG (Export for web in photoshop) with quality 70.

Last day I heard about pngcrunch, tried it but file size is the same...

http://pmt.sourceforge.net/pngcrush/

Take a look at this previous post : Understanding 24 bit PNG generated with Photoshop

thierryb
Hmm … any particular reason *why* you are using JPEG instead of PNG? Does the image contain a photograph?
Konrad Rudolph
Size is only the reason
thierryb
A: 

24 bit is red, green and blue with 8 bits each. 32 bits is RGB plus an 8-bit alpha channel. So if you need (semi-)transparent images, you should go for 32bit PNG, otherwise 24bit.

You don't have to compress/crush the PNGs yourself, Xcode's build steps will automatically use pngcrush and re-order the color channels for the iPhone's BGR memory alignment.

MrMage
With photoshop you are able to export an image to png only in 8 or 24 bits but not 32.And 24 bits contains transparency, how this is possible ?
thierryb
Thanks for the answer MrMage. I get it now about the 24 bit.I know that Xcode will optimize automatically. However, the idea would be to prepare the image for the best compression. Depending on how the optimization tool works (here pngcrush), there is some techniques to save even more space and to get the best quality (specially about colors).What about the PNG interlaced option? Does it affect the iPhone display?