How To Install Mozjpeg 2.0, Improved JPEG Encoding Library.
The major feature in this release is trellis quantization, which improves compression for both baseline and progressive JPEGs without sacrificing anything in terms of compatibility. Previous versions of mozjpeg only improved compression for progressive JPEGs.For more detail, read : #-Link-Snipped-#
Other improvements include:
- The cjpeg utility now supports JPEG input in order to simplify re-compression workflows.
- Weâve added options to specifically tune for PSNR, PSNR-HVS-M, SSIM, and MS-SSIM metrics.
- We now generate a single DC scan by default in order to be compatible with decoders that canât handle arbitrary DC scans.
How To Install ?
- Download source code from <a href="https://github.com/mozilla/mozjpeg/releases/tag/v2.0" target="_blank" rel="nofollow noopener noreferrer">Release mozjpeg v2.0 · mozilla/mozjpeg · GitHub</a>
- Extract it
- Install required libs i.e autoconf, automake, make, nasm & libtool
Now let's build :
- cd mozjpeg-2.0
- autoreconf -fiv
- mkdir build
- cd build
- sh ../configure
- sudo make install

For usage read MAN pages from : /opt/libmozjpeg/man
You can use jpegtran located under /opt/libmozjpeg/bin to compress the image.
