Which is the best format or best technique to compress images without loss of quality for iPhone/iPad games?
The commonly used formats are PNG and PVR.
The PNG (Portable Network Graphics) format is compressed but lossless. It's a commonly used format (basically any image-editing software can write to PNG).
The PVR (PowerVR) format is a format that is much closer to the native memory structure of images on the GPU of the iPhone. Therefore it also allows for some byte-orderings that are available on the GPU but not usually used in image-processing, such as RGBA4444 (4 bits instead of 8 bits per channel). Of course a reduction in bits per channel also means a quality-loss... it's highly dependent on your type of image if this quality loss will be noticeable or not.
The PVR format is faster to read to the GPU and it gives you more control over how much memory your texture will consume. PNG is ubiquitous and much easier to work with. Almost any image editing software can read/write it and there are tools like ImageOptim that allow even further compression/optimization of PNGs.
Update Just to clarify if that wasn't clear from what I have written above: Further optimizing and compressing a PNG will only result in smaller file-size, eg. less disk-space that's being used. That can be important if you aim for a small app-package size (eg. to stay below the 50mb limit to download over cellular networks). Usage of graphics-memory is also important and if you want to optimize graphics-memory consumption, then your only option is to use PVR (unless you load PNGs and convert them to other formats/byte-orderings dynamically... but that's another story).
As long as you aren't facing any texture memory issues, PNG is far easier to work with.
You need to have a good eye so that you can get the most out of your textures.
- I always compare RGBA4444 with RGBA8888. If the difference is not that noticeable, I use RGBA4444 instead. It saves a LOT of memory.
- If quality seems to degrade RGBA4444, apply Dithering. See if it's workable.
- If I need to compress the project's total filesize. I'm looking for any texture that can be in JPEG. JPEG's filesize is very small compared to PNG but tradeoff is you're gonna lose a lot of processing. It'll be slower. I'm using this for textures that do not have any alpha channel. Also, only use this for something that is seldom used or textures that are loaded once and it'll stay long on the screen (like splashscreen, background). Never use JPEG if you need to draw it frequently on the screen.
Anyway, only do this if you have problem with memory/filesize. In my case, we have tight schedule so we optimize beforehand as long as quality will not degrade.