mozjpeg

by mozilla

mozilla / mozjpeg

Improved JPEG encoder.

4.3K Stars 365 Forks Last release: about 1 month ago (v4.0.1-rc2) Other 4.0K Commits 55 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

News: About Instagram's flaw

Instagram had a security vulnerability. Instagram uses MozJPEG. These two facts were somewhat conflated in the vulnerability report that gets reposted all over the Internet right now.

MozJPEG is NOT affected by this vulnerability. The issue was in Facebook's own integration code, unique to only Instagram, and not in MozJPEG. There will be no MozJPEG patches in response to that report, because it's not a MozJPEG issue.


Mozilla JPEG Encoder Project Build Status

MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders.

MozJPEG is based on libjpeg-turbo. Please send pull requests to libjpeg-turbo if the changes aren't specific to newly-added MozJPEG-only compression code. This project aims to keep differences with libjpeg-turbo minimal, so whenever possible, improvements and bug fixes should go there first.

It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg. MozJPEG makes tradeoffs that are intended to benefit Web use cases and focuses solely on improving encoding, so it's best used as part of a Web encoding workflow.

MozJPEG is meant to be used as a library in graphics programs and image processing tools. We include a demo

cjpeg
tool, but it's not intended for serious use. We encourage authors of graphics programs to use MozJPEG's C API instead.

Features

  • Progressive encoding with "jpegrescan" optimization. It can be applied to any JPEG file (with
    jpegtran
    ) to losslessly reduce file size.
  • Trellis quantization. When converting other formats to JPEG it maximizes quality/filesize ratio.
  • Comes with new quantization table presets, e.g. tuned for high-resolution displays.
  • Fully compatible with all web browsers.
  • Can be seamlessly integrated into any program using libjpeg.

Releases

Compiling

See BUILDING.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.