This is what I use to compress photos for upload to online galleries.
Somebody has asked me for this a long time ago. Well, I'm not sure if they still wants it, but here it is.
For now, the program paths are hardcoded for my own use.
- bash
- mozjpeg (other cjpeg not tested)
- imagemagick (don't put untrusted images through this script)
- exiftool
- GNU parallel (I'm not sure if its startup message is even meaningful for a GPL licensed software...)
- dssim, compiled with USE_LIBJPEG=true