C Assembly HTML PHP Java C++ Other
Clone or download
kkopachev and kornelski Prefer smaller file only on non-image changing operations
When cli arguments request image-changing operation (like transform, scans or arith coding) to be applied, force output result file, even if it has bigger filesize than original
Latest commit 86a9bd1 Jul 13, 2018
Permalink
Failed to load latest commit information.
cmakescripts Windows build: Add an "uninstall" target Nov 21, 2016
doc/html Doc tweak: TJFLAG_ACCURATEDCT is the first flag Nov 14, 2017
java Merge tag '1.5.3' Dec 23, 2017
md5 Fix md5cmp on AmigaOS 4 (PowerPC big-endian) Dec 2, 2016
release Merge tag '1.5.3' Dec 23, 2017
sharedlib Merge libjpeg-turbo r1390 Sep 7, 2014
simd Merge tag '1.5.3' Dec 23, 2017
testimages 12-bit JPEG support Aug 9, 2014
win Merge tag '1.5.2' Jul 10, 2017
.gitauthors Script for git-svn reinitialization Sep 7, 2014
.gitignore Version bump Jul 10, 2017
BUILDING.md BUILDING.md: Include Android/x86 build recipes Jun 27, 2017
BUILDING.txt Merge remote-tracking branch 'libjpeg-turbo/1.4.x' into libjpeg-turbo Apr 27, 2016
CMakeLists.txt CMAKE_SOURCE_DIR -> CMAKE_CURRENT_SOURCE_DIR Jun 7, 2018
ChangeLog.md jpeg_crop_scanlines: Handle gray images w/ samp!=1 Dec 6, 2017
LICENSE.md LICENSE.md: Include text of BSD/zlib licenses Dec 10, 2016
Makefile.am Merge tag '1.5.3' Dec 23, 2017
README-mozilla.txt Consider vertical gradient in DC trellis Dec 16, 2014
README-turbo.txt Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
README.ijg Include some comments/doc tweaks from jpeg-9+ Feb 18, 2016
README.md Expanded readme Apr 30, 2017
acinclude.m4 Build: Fix AltiVec detection on OS X Leopard Sep 1, 2017
bmp.c Silence pedantic GCC6 code formatting warnings Jul 14, 2016
bmp.h Initial commit of libjpeg-turbo plus readme edits. Jan 14, 2014
cderror.h Copy ICC profile from PNG to JPEG Apr 30, 2017
cdjpeg.c Use consistent/modern code formatting for pointers Feb 19, 2016
cdjpeg.h Merge tag '1.5.3' Dec 23, 2017
change.log change.log: Refer users to ChangeLog.md Mar 13, 2016
cjpeg.1 Honor max_memory_to_use/JPEGMEM/-maxmemory Mar 18, 2017
cjpeg.c Add -nojfif param Jun 4, 2018
coderules.txt Rename README, LICENSE, BUILDING text files Oct 10, 2015
configure.ac Merge tag '1.5.3' Dec 23, 2017
djpeg.1 Further partial image decompression fixes Nov 14, 2017
djpeg.c Further partial image decompression fixes Nov 14, 2017
doxygen-extra.css Fix whitespace errors Dec 14, 2017
doxygen.config Bump TurboJPEG C API revision to 1.5 Feb 29, 2016
example.c Use consistent/modern code formatting for pointers Feb 19, 2016
git-init-svn.sh Script for git-svn reinitialization Sep 7, 2014
jaricom.c Replace INT32 with a new internal datatype (JLONG) Oct 15, 2015
jcapimin.c Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
jcapistd.c Restore backward ABI compatibility with libjpeg/libjpeg-turbo by movi… Nov 4, 2014
jcarith.c Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
jccoefct.c Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
jccolext.c Replace INT32 with a new internal datatype (JLONG) Oct 15, 2015
jccolor.c Format copyright headers more consistently May 29, 2016
jcdctmgr.c Merge tag '1.5.3' Dec 23, 2017
jcext.c Const on getters Jan 24, 2015
jchuff.c Format copyright headers more consistently May 29, 2016
jchuff.h Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
jcinit.c Fix trellis / no Huffman opt combination Dec 10, 2014
jcmainct.c Use consistent/modern code formatting for pointers Feb 19, 2016
jcmarker.c Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
jcmaster.c Allocate from temporary image pool to avoid leaking mem mgr Jun 8, 2016
jcmaster.h Merge remote-tracking branch 'libjpeg-turbo/1.4.x' into libjpeg-turbo Apr 27, 2016
jcomapi.c Clean up a couple of copyright messages Feb 19, 2016
jconfig.h.in Merge tag '1.5.0' Jun 7, 2016
jconfig.txt Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
jconfigint.h.in Fix build when CFLAGS contains -std=c89 (or -ansi) Dec 5, 2016
jcparam.c Calculate jpeg_simple_progression nscans correctly Jul 6, 2017
jcphuff.c Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
jcprepct.c Use consistent/modern code formatting for pointers Feb 19, 2016
jcsample.c Format copyright headers more consistently May 29, 2016
jcstest.c Code formatting tweaks Nov 18, 2017
jctrans.c Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
jdapimin.c Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
jdapistd.c jpeg_crop_scanlines: Handle gray images w/ samp!=1 Dec 6, 2017
jdarith.c Fix UBSan warning in arithmetic decoder Sep 22, 2016
jdatadst-tj.c Code formatting tweaks Nov 18, 2017
jdatadst.c Fixing compiler warning -Wmissing-prototypes Jun 10, 2018
jdatasrc-tj.c Don't allow opaque source/dest mgrs to be swapped May 11, 2016
jdatasrc.c Don't allow opaque source/dest mgrs to be swapped May 11, 2016
jdcoefct.c libjpeg API: Partial scanline decompression Feb 20, 2016
jdcoefct.h Use consistent/modern code formatting for pointers Feb 19, 2016
jdcol565.c Fix compiler warnings under Visual C++ Oct 15, 2015
jdcolext.c Replace INT32 with a new internal datatype (JLONG) Oct 15, 2015
jdcolor.c Code formatting tweaks Nov 18, 2017
jdct.h Use consistent/modern code formatting for pointers Feb 19, 2016
jddctmgr.c Format copyright headers more consistently May 29, 2016
jdhuff.c Silence additional UBSan warnings Sep 9, 2016
jdhuff.h Use consistent/modern code formatting for pointers Feb 19, 2016
jdinput.c libjpeg API: Partial scanline decompression Feb 20, 2016
jdmainct.c Fix MinGW build Feb 6, 2016
jdmainct.h Use consistent/modern code formatting for pointers Feb 19, 2016
jdmarker.c Use consistent/modern code formatting for pointers Feb 19, 2016
jdmaster.c Use plain upsampling if merged isn't accelerated Jul 14, 2016
jdmaster.h libjpeg API: Partial scanline decompression Feb 20, 2016
jdmerge.c Code formatting tweaks Nov 18, 2017
jdmrg565.c Fix compiler warnings under Visual C++ Oct 15, 2015
jdmrgext.c Replace INT32 with a new internal datatype (JLONG) Oct 15, 2015
jdphuff.c Silence additional UBSan warnings Sep 9, 2016
jdpostct.c Use consistent/modern code formatting for pointers Feb 19, 2016
jdsample.c Implement h1v2 fancy upsampling Jul 13, 2016
jdsample.h Use consistent/modern code formatting for pointers Feb 19, 2016
jdtrans.c Rename README, LICENSE, BUILDING text files Oct 10, 2015
jerror.c Use consistent/modern code formatting for pointers Feb 19, 2016
jerror.h Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
jfdctflt.c Use consistent/modern code formatting for pointers Feb 19, 2016
jfdctfst.c Format copyright headers more consistently May 29, 2016
jfdctint.c Format copyright headers more consistently May 29, 2016
jidctflt.c Use consistent/modern code formatting for pointers Feb 19, 2016
jidctfst.c Use consistent/modern code formatting for pointers Feb 19, 2016
jidctint.c Format copyright headers more consistently May 29, 2016
jidctred.c Format copyright headers more consistently May 29, 2016
jinclude.h Rename README, LICENSE, BUILDING text files Oct 10, 2015
jmemmgr.c Fix broken build w/ Visual C++ < 2010 Oct 4, 2016
jmemnobs.c Honor max_memory_to_use/JPEGMEM/-maxmemory Mar 18, 2017
jmemsys.h Use consistent/modern code formatting for pointers Feb 19, 2016
jmorecfg.h Replace INT32 with a new internal datatype (JLONG) Oct 15, 2015
jpeg_nbits_table.h Use precomputed table Jul 24, 2014
jpegcomp.h Format copyright headers more consistently May 29, 2016
jpegint.h Merge tag '1.5.1' Mar 12, 2017
jpeglib.h JPEG_C_PARAM_SUPPORTED to allow detection of the API Mar 18, 2017
jpegtran.1 Honor max_memory_to_use/JPEGMEM/-maxmemory Mar 18, 2017
jpegtran.c Prefer smaller file only on non-image changing operations Jul 31, 2018
jpegyuv.c Merge pull request #207 from mozilla/jpg-yuv-cleanup May 25, 2016
jquant1.c Use consistent/modern code formatting for pointers Feb 19, 2016
jquant2.c Use consistent/modern code formatting for pointers Feb 19, 2016
jsimd.h Format copyright headers more consistently May 29, 2016
jsimd_none.c Format copyright headers more consistently May 29, 2016
jsimddct.h Use consistent/modern code formatting for pointers Feb 19, 2016
jstdhuff.c Merge branch '1.4.x' Mar 6, 2016
jutils.c Use consistent/modern code formatting for pointers Feb 19, 2016
jversion.h Merge tag '1.5.2' Jul 10, 2017
libjpeg.map.in Initial commit of libjpeg-turbo plus readme edits. Jan 14, 2014
libjpeg.txt Honor max_memory_to_use/JPEGMEM/-maxmemory Mar 18, 2017
rd_average.sh Adding scripts to generate rd-curves. Mar 17, 2014
rd_collect.sh Adding scripts to generate rd-curves. Mar 17, 2014
rd_collect_sub.sh Adding scripts to generate rd-curves. Mar 17, 2014
rd_plot.sh Adding scripts to generate rd-curves. Mar 17, 2014
rdbmp.c Merge remote-tracking branch 'libjpeg-turbo/master' into libjpeg-turbo Apr 28, 2016
rdcolmap.c Use consistent/modern code formatting for pointers Feb 19, 2016
rdgif.c Rename README, LICENSE, BUILDING text files Oct 10, 2015
rdjpeg.c Reconcile indentation, whitespace, and other code formatting with lib… Nov 6, 2014
rdjpgcom.1 The Independent JPEG Group's JPEG software v7 Jul 27, 2015
rdjpgcom.c Use consistent/modern code formatting for pointers Feb 19, 2016
rdpng.c Embed an sRGB profile if PNG had an sRGB chunk May 11, 2017
rdppm.c Fix sign mismatch comparison warnings Dec 3, 2016
rdrle.c Use consistent/modern code formatting for dbl ptrs Feb 19, 2016
rdswitch.c If there is no explicit subsample argument, guess the default from th… Mar 18, 2017
rdtarga.c Use consistent/modern code formatting for pointers Feb 19, 2016
structure.txt Honor max_memory_to_use/JPEGMEM/-maxmemory Mar 18, 2017
tjbench.c tjbench.exe: Fix decompression access violation Nov 14, 2017
tjbenchtest.in Uniquify tjbenchtest log file names based on args Nov 18, 2017
tjbenchtest.java.in Uniquify tjbenchtest log file names based on args Nov 18, 2017
tjexampletest.in Uniquify tjbenchtest log file names based on args Nov 18, 2017
tjunittest.c TJBench/TJUnitTest: Don't ignore mistyped args Nov 13, 2017
tjutil.c Initial commit of libjpeg-turbo plus readme edits. Jan 14, 2014
tjutil.h Initial commit of libjpeg-turbo plus readme edits. Jan 14, 2014
transupp.c Always tweak EXIF w/h tags w/ lossless transforms Jan 20, 2017
transupp.h Use consistent/modern code formatting for pointers Feb 19, 2016
turbojpeg-jni.c Fix compiler warning Feb 14, 2016
turbojpeg-mapfile Oops. Include the tjPlane*() functions in the mapfile so that they ar… Nov 22, 2014
turbojpeg-mapfile.jni Oops. Include the tjPlane*() functions in the mapfile so that they ar… Nov 22, 2014
turbojpeg.c Merge tag '1.5.3' Dec 23, 2017
turbojpeg.h Doc tweak: TJFLAG_ACCURATEDCT is the first flag Nov 14, 2017
usage.txt Merge tag '1.5.2' Jul 10, 2017
wizard.txt Convert tabs to spaces in the libjpeg code and the SIMD code (TurboJP… May 11, 2014
wrbmp.c Code formatting tweaks Nov 18, 2017
wrgif.c Further partial image decompression fixes Nov 14, 2017
wrjpgcom.1 The Independent JPEG Group's JPEG software v6 Jul 29, 2015
wrjpgcom.c wrjpgcom: Fix comment typo Sep 5, 2017
wrppm.c Further partial image decompression fixes Nov 14, 2017
wrrle.c Further partial image decompression fixes Nov 14, 2017
wrtarga.c Further partial image decompression fixes Nov 14, 2017
yuvjpeg.c yuvjpeg: fix NULL dereference on invalid format string Jul 15, 2016

README.md

Mozilla JPEG Encoder Project

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. 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