Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
image_optim doesn't optimise jpegs as well as ImageOptim.app. After routing through each, I discovered that this gem is lacking JPEGrescan support.
After adding this, my image_optim output appears to exactly match that of the desktop app, with the example image I've been testing going from a 0.30% to 6.49% reduction.
JPEGrescan works as a layer over the top of jpegtran, and I've included it in the jpegtran worker (in the same style as http://code.google.com/p/imageoptim/source/browse/trunk/imageoptim/Workers/JpegtranWorker.m). I think this is the best way to provide support without duplicating execution of jpegtran.
More on JPEGrescan: http://news.ycombinator.com/item?id=803839