- Code: Select all
jpegoptim --strip-all --quiet $a
Use JPEGoptim to remove unneccessary metadata and compact JPEG's losslessly.
- Code: Select all
jpegtran -progressive
Convert all JPEG's to use progressive compression.
- Code: Select all
jpegoptim --strip-all --quiet $a # Optimise JPEG's losslessly
jpegoptim --strip-all -m95 --quiet $a # Cap JPEG's at m%
jpegtran -progressive -outfile $a $a #.prog $a
jpegoptim --strip-all --quiet $a # Optimise JPEG's losslessly
Some other JPEG stuff which limits quality to 95% (over that is generally pointless), then uses progressive compression, then does some more jpegoptim, for some complicated looping reason.
- Code: Select all
advpng -z4
Use advpng to hack great lumps off of PNG's losslessly and quickly.
- Code: Select all
optipng -zw32k -zc1-9 -zm1-9 -zs0-3 -f0-5 $b
optipng -zw16k -zc1-9 -zm1-9 -zs0-3 -f0-5 $b
optipng -zw8k -zc1-9 -zm1-9 -zs0-3 -f0-5 $b
optipng -zw4k -zc1-9 -zm1-9 -zs0-3 -f0-5 $b
optipng -zw2k -zc1-9 -zm1-9 -zs0-3 -f0-5 $b
optipng -zw1k -zc1-9 -zm1-9 -zs0-3 -f0-5 $b
optipng -zw512 -zc1-9 -zm1-9 -zs0-3 -f0-5 $b
Run 13608 different sets of compression parameters on all PNG's. This takes ages.
- Code: Select all
zip -rq9DX
Zip each .pk3 or ZIP with the highest options.
- Code: Select all
advzip ../$1 -z4
Recompact to attempt smaller filesize.
This leaves a completely lossless Nexuiz installation ZIP. This is unlike Nexuiz-lite which has files removed. On some JPEG's ~65% is saved.
The Nexuiz 1.5 download is normally 178.1Mb. I have got it down to 147.8Mb!
Again, this is entirely lossless, the game works exactly the same afterwards, no performance loss. The only downside is that it is 1bout an hour of computer time but it can all be automated.
I could send some of these scripts to the devs if you wish to reduce the Nexuiz download size. I think this might get more people downloading Nexuiz. All of the programs used are open source and I have downloaded them from various sources, latest versions.
I have also used similar algorithms on another game where I managed to take over 97% off of a JPEG, losslessly!