Apr 24
Apple’s iPhone Application Programming Guide lists that the iphone supports png, tiff, jpeg, gif, bmp, ice, cur, and xbm image formats, but of these it recommends the png format.  The guide goes on to say that the “iPhone OS includes an optimized drawing path for PNG images that is typically more efficient than other formats”.  I would like to see how specifically the iphone OS is optimized for drawing PNG images versus other formats, but I suspect that is for Apple to know and for me to pontificate about.

Regardless, png is a good format that leaves little to be complained about; it supports up to a 64 bit color depth, and transparency. Another upside to png is that they are compressed and the method by which they are compressed(the “deflate” algorithm) is lossless.  A jpeg image, by contrast, uses a lossy compression algorithm.

What some don’t know is that your png images may not be compressed as tightly as possible.  I discovered this recently after I generated a set of png images from a 3ds max animation.

For fun, I decided to search out tools that would optimize the size of png images.  I ended up trying four tools; PNGOUTWin, pngout, defltopt, and pngcrush.  PNGOUTwin costs $15 and is available for Windows only, while the others  are available for OS X , Windows, and Linux and are free.  All of the tools are command line executables except PNGOUTwin which has a GUI.

While I did not perform a fully exhaustive survey of the different tools, I did try each of the tools with the image shown above.  This image is one in a sequence of about 100 images that make up an animation within my upcoming iphone application.  As already mentioned, this image was generated by 3ds max in the png format, and was 24,085 bytes.


Orignal File Size: 24,085 bytes
pngout: 21,709 (9.8% reduction)
PNGOUTwin: 22,110   (8.2% reduction) 21,970 (8.8% reduction)
pngcrush: 23,392 (2.8% reduction)
deflopt: 24,051 (0.1 % reduction)

So, from this limited test, pngout was the winner.  However, if you happen to have an irrational fear of the command line, PNGOUTwin came in a pretty close second place.
Tagged with:
Sep 14

And the winner is………well, it’s complicated.

Tagged with:
Sep 02

So I have been trying to buy Snow Leopard from the local college bookstore (as there is not an Apple store in the area) this last week. A day or two before the release date they told me they would have them in on the Friday release date. Great! So I canceled my pre-order at Amazon and decided to buy locally. The release date arrives, and I call to confirm they have SL in only to be informed they only have copies available for people who had reserved them. Though disappointed, it is not a big deal since they also inform me they would have an abundant supply of SL discs on Monday. I call on Monday, and they tell me that there was a delay and they would arrive from Apple on Wednesday. I just called today (Wednesday) and now the shipment of SL is expected Friday. Grrrrrrrr…..

I’ve just ordered my copy on Amazon. The good news is that I’ve had plenty of time to benchmark my machine with leopard. If I can ever get a copy of SL, I’ll bench it and post a comparison of the results between it and leopard.

Tagged with:
preload preload preload