简体   繁体   中英

How is jpegtran related to libjpeg-turbo, jpegoptim, and mozjpeg?

From what I understand, jpegtran is included with libjpeg-turbo and it is used when saving an Image with optimize=True . Jpegoptim uses an identical algorithm as jpegtran, but requires the image to be temporarily saved to disk before it can be optimized, and jpegoptim has the additional ability to compress lossly.

Looking at the mozjpeg repo on Github, there are a lot of references to libjpeg-turbo, and it has way more stars, so my question is how are they related? Is mozjpeg a fork of libjpeg-turbo that does everything and more? Ie, is it possible to disable certain features in mozjpeg and end up with identical performance and results as libjpeg-turbo?

Yes, mozjpeg is a fork of libjpeg-turbo. In mozjpeg v1.0 , they confirm it. Actually it's a combination of three technologies (progressive JPEG encoding, jpgcrush, and trellis quantization) to reduce the size of JPEG images. Progressive JPEG is supported in libjpeg-turbo, but jpgcrush and trellis quantization are not.

mozjpeg's implementation of the libjpeg API includes an extensibility framework that allows new features to be added without modifying the transparent libjpeg compress/decompress structures.

The JPEG files mozjpeg generates require much more time to compress than to decompress. When the default settings are used, mozjpeg is considerably slower than libjpeg-turbo or even libjpeg at compressing images. Thus, it is not generally suitable for real-time compression. It is best used as part of a web encoding workflow.

Find more information from here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM