Since we're at RC2, I'm assuming images will not be changing much.
First commit losslessly re-compresses both themes' (default and valencia) images w/ optipng, advpng, and advdef, for a savings of 17%. Every byte counts!
I've also added new build targets, "images" and "imagesmin", which will copy and recompress images as part of jQM's build process.
More details on my research into PNG optimization at:
Fixes issue #2650.
Losslessly minimize themes’ PNGs
Minimized themes’ PNGs for a space savings of 17%.
Losslessly minimize PNGs as part of build process
Minimize PNGs w/ optipng, advpng, and advdef (these 3 tools compress
better than pngcrush). These 3 tools can be found in the Debian/Ubuntu
packages: optipng advancecomp
Thanks for the pull request. I like the idea but it adds a dependency on the png tools you're using. We should make it a soft dependency as in not fail if the tools aren't there, just warn.
@gseguin Thanks for the comments!
As is, it already soft fails—if the tools are not present, the unoptimized images will end up in the compiled directory/the zip archive without any other issue.
However, the warnings/errors printed aren't that pretty. I'll look into printing a more friendly warning.
If there truly is no difference in quality, then could you submit a pull request that just changes the images and doesnt include in the build process?
The recompression is lossless—no difference in quality. Most graphics packages don't do this amount of optimization because it'd take significantly more time to save PNGs.
Closing this pull request, new pull request is issue #2844.