Here is a patch for jpegrescan.
Description
Event Timeline
This hasn't seen a release in a couple years and isn't maintained. Are there not any actively maintained alternatives?
For this type of recompression, I believe Mozjpeg https://github.com/mozilla/mozjpeg does the same thing, but replaces libjpeg-turbo. If you don't feel it's needed, that's fine :) As usual, I packaged for my own use.
@W-Floyd What does this do that jpegoptim (jpegoptim) or jpegtran (libjpeg-turbo-devel) can't?
It micromanages jpegtran options, getting better compression levels than either of them on their own in some cases. If you don't think it's needed, that's fine :P
From what I'm seeing of benchmarks on the web, that compression savings is on the order of 0.5-1% overall. That seems like an awful gain considering how much longer it takes to run (6-10x as long as jpegtran).