jcupitt/libvips — pull request #76 by lovell (2013-10-01 22:03:49+00:00)
Title: Add optional optimize_coding param to JPEG output methods to compute optimal Huffman coding tables, defaults to FALSE.

Hi John, I hope you don't mind me taking the liberty of adding a new, optional parameter to the various JPEG output methods. The optimize_coding param, defaulting to FALSE, is passed through to the libjpeg(-turbo)'s param of the same name.

The default value of optimize_coding is FALSE as there's a slight performance hit in using this. Setting optimize_coding to TRUE generates a JPEG image that is typically 3-5% smaller in file size.

This is the basic premise of tools like jpegtran and jpegoptim, but now libvips can offer it for free! http://stackoverflow.com/questions/985725/tools-for-jpeg-optimization