The protocol explains for every image, what is the next recommended step:
- convert opaque PNG to JPG - currently the APP contains a completely opaque PNG where a JPG would be a much better choice
- re-quantify PNG - a PNG could be re-compressed to a smaller PNG
- re-compress JPG - a JPG image can be replaced by an at least 90% JPG
Because the APPs are code signed, it is not possible for WASTED to perform these steps itself, you have to manually check the optimized images first and then replace them accordingly.
As of V2.3 you can integrate WASTED into your XCode workflow:
- Edit your project scheme
- open the "Archive" scheme (or any other scheme you like)
- select "Post-actions"
- add a new "Run script action"
- enter open -a Wasted "${ARCHIVE_PATH}" into the script field
Now every time you archive your project, WASTED will automatically be opened and analyses your project.
My fork of HockeyAPP contains the image analysis, grab it from github.
If you want to compare original and optimized images, Kaleidoscope is a wonderful tool for that.
A more graphical overview of the package content provides GrandPerspective.
Unused furthermore provides a report about unused resources in XCode projects.
The optimized image files are native PNG or JPG images and thus completely compatible with iOS and OS-X and the rest of the world.
WASTED itself was tested on OS-X 10.8 and is backward compatible with 10.7.
WASTED is available under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE..
Wasted uses following libraries: pngquant, Sparkle