Re: Xcode4.5's version of pngcrush making images larger!
Re: Xcode4.5's version of pngcrush making images larger!
- Subject: Re: Xcode4.5's version of pngcrush making images larger!
- From: Alex Zavatone <email@hidden>
- Date: Mon, 01 Oct 2012 14:20:52 -0400
On Oct 1, 2012, at 1:30 PM, David Hoerl wrote:
> The largest ipad retina image was crushed by me using some crush tool (maybe pngcrush) - its 963K. When phgcrush -iphone processes it, it becomes 1.6M - well over 50% larger.
OK. That's simply insanely terrible. Now, depending on what you're using the compression/optimization for, the only area where I have seen performance issues under iOS are with using optimized PNGs as MKMapKit overlays.
The link on Peter Ornel's page at http://imageoptim.com/xcode.html are quite helpful if you prefer to optimize your images your own way and tell Xcode to not reoptimize them.
Back when we did FiOS, Peter's tool was invaluable, but there are additional tricks if you plan on using it that I used in a wrapper application.
Basically, for FiOS TV, we had all custom graphics that wouldn't fit on the low end set top boxes. Running everything through ImageOptim once was nice, with one core dedicated to each optimization job. This got is 24% payload savings, allowed the product to fit on the low end boxes and freed up developers from having to prune code to make the whole deliverable fit in the small amount of storage space we had.
But what was even more useful was the "lather, rinse, repeat" approach, where for each graphic, when completing an optimization, if the % optimized > 0 then throw it back in the queue and keep optimizing until you get 0 bytes saved.
Using this approach got us from a 24% file size saving overall to a 28% file size savings.
Additionally, if you are using a tool like Illustrator or Photoshop, NEVER EVER save as PNG. This will add a boatload of useless metadata to the file that will not benefit from optimization. Always use Save For Web. And if you don't need the alpha channel, remove it.
If you have a large & of PNG files in your payload, it's best to create a server to your local network where each client machine returns "I have this many processor cores". One Mac that starts up first declares itself as the coordinating server and handles distribution to all the clients that see it as a client, but also as the coordinator.
I ended up taking all the old G5s that were lying around, a few 12 core Macs and a few others and ended up able to reoptimize the entire payload using this system and an wrapper app to ImageOptim that allowed us to turn the 3 hour optimization into about 15 mins. This meant that if we needed to, we could, from source AI files, create an entire drop of the GUI from scratch overnight, scaled to any size and completely optimized.
Don't know if any of you have massive graphics payloads, that you want to optimize, but if you do, this saved us a few hundred thousand dollars easy.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden