libjpeg-turbo SDK for GCC

libjpeg-turbo·libjpeg-turbo.libjpeg-turbo.GCC

SIMD-accelerated libjpeg-compatible JPEG codec library

libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. On such systems, libjpeg-turbo is generally 2-6x as fast as libjpeg, all else being equal. On other types of systems, libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines. In many cases, the performance of libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.

winget install --id libjpeg-turbo.libjpeg-turbo.GCC --exact --source winget

Latest 3.2.1·October 27, 2026

Release Notes

Significant changes relative to 3.2.0:

  1. Fixed a regression introduced by 3.2 beta1[9] that broke Un*x builds in which position-independent code (PIC) was not enabled for static libraries. This issue could be worked around by explicitly setting the CMAKE_POSITION_INDEPENDENT_CODE CMake variable or using a toolchain, such as the ones provided by Ubuntu, that automatically enables PIC.
  2. The RISC-V Vector (RVV) forward DCT modules now use strided segment load intrinsics to simultaneously load sample rows from memory and transpose them into columns, as well as multiply-accumulate intrinsics where appropriate. When using the accurate integer DCT algorithm, RGB-to-baseline JPEG compression is approximately 10-17% (avg. 13%) faster (relative to libjpeg-turbo 3.2.0) with GCC 14 and 1-8% (avg. 4%) faster with Clang 20. (Tested on a 1.6 GHz Ky X1 CPU. Actual mileage may vary.)
  3. Symbols from the in-tree zlib and libspng implementations introduced by 3.2 beta1[9] are now hidden, which prevents the symbols from being exposed in downstream shared libraries and applications that link with the static TurboJPEG API library. Symbols from the in-tree zlib implementation are now also renamed, which prevents downstream shared libraries and applications that link with the static TurboJPEG API library from accidentally calling the in-tree zlib implementation when they intend to call the system-supplied zlib implementation.
  4. Fixed an integer overflow and subsequent buffer overrun that occurred when attempting to use tj3LoadImage12() or tj3LoadImage16() from a 32-bit build of libjpeg-turbo to load a packed-pixel image with more than 2^31 components.
  5. Fixed a division-by-zero error (CVE-2026-75466) that occurred when attempting to load a non-grayscale indexed-color PNG image using tj3LoadImage*() if the pixel format of the packed-pixel buffer was unspecified (TJPF_UNKNOWN.)
  6. Fixed an issue whereby tj3DecompressToYUV*() produced incorrect chrominance values when decompressing a 4:2:0, 4:1:0, or 2:4 JPEG image with the "fast" IDCT algorithm and a scaling factor of 1/2. (In other words, TJPARAM_FASTDCT was not ignored as it should be when decompression scaling is enabled.)
  7. Fixed a buffer overrun and subsequent segfault that occurred on certain platforms when attempting to partially decompress a specially-crafted 4:2:0 JPEG image using the merged (non-fancy) upsampling algorithm with the libjpeg-turbo SIMD extensions disabled and a cropping region that would have caused any of the component planes to be cropped to a width of 1 or 2 samples.
  8. Hardened the libjpeg API against hypothetical applications that may erroneously attempt to decompress a full-color 12-bit-per-sample JPEG image with both one-pass color quantization and RGB565 color conversion enabled. This could have caused a buffer overrun in one of the quantizer's color index arrays. The buffer overrun did not likely pose a security risk, since an application that abused the API in the aforementioned manner could never work properly.
  9. Fixed issues in jpeg*_skip_scanlines() whereby, when skipping certain groups of scanlines while using a non-fancy (merged or plain) upsampling algorithm with a vertical sampling factor greater than 1, the wrong number of scanlines were skipped and/or skipped scanlines were returned in subsequent calls to jpeg*_read_scanlines().
  10. Hardened the TurboJPEG API against hypothetical applications that may erroneously pass an invalid image to tj3DecompressHeader(), ignore a fatal error thrown by that function, and attempt to call the function again with a valid image. Under certain circumstances, this could have caused the values of TJPARAM_JPEGWIDTH and TJPARAM_JPEGHEIGHT to reflect the dimensions reported in the invalid image's header rather than the valid image's header, which might have caused the caller to allocate too small of a buffer to hold the decompressed valid image.
  11. tj3DecompressHeader() now always removes the ICC profile (if any) that was previously extracted into the TurboJPEG instance. This addresses an oversight in 3.2 beta1[10] whereby, if the same TurboJPEG instance was used to decompress or transform multiple JPEG images, then tj3GetICCProfile() and tj3TransformBufSize() behaved as if JPEG images with no ICC profile contained the last ICC profile extracted.
  12. tj3TransformBufSize() has been improved in the following ways:
    • The function now accounts for the size of all extra markers (including comments, JFIF thumbnails, and Exif data) that will be copied from the source image to the destination image, given the current value of TJPARAM_SAVEMARKERS and the specified transform options.
    • The function now returns accurate results regardless of the value of TJPARAM_SAVEMARKERS at the time tj3DecompressHeader() was called. This reflects the fact that only the current value of TJPARAM_SAVEMARKERS and the specified transform options affect the marker copying behavior in tj3Transform().
  13. Fixed issues in jpegtran that prevented a grayscale image from being dropped into a subsampled input image or vice versa.
  14. Hardened the TurboJPEG API against hypothetical applications that may erroneously attempt to use the same insufficiently large pre-allocated destination buffer for multiple simultaneous transform operations in tj3Transform(). This caused a use-after-free issue, because the caller-specified destination buffer was no longer valid after the first transform operation reallocated it.
  15. Fixed multiple issues in the standalone (non-merged) RGB565 color converters that occurred when attempting to decompress more than one scanline at a time from a vertically subsampled JPEG image. These issues caused a buffer overrun and subsequent segfault if the output image rows were not 4-byte aligned, the image width was 1, and both the vertical sampling factor and the number of scanlines decompressed at a time were greater than 2. In other cases, the issues caused incorrect dithered output. The issues could not be reproduced using djpeg (which decompresses one scanline at a time) and were not known to exist in any other applications.

Installer type: nullsoft

x86—5223DFA82DF6252A170C74355A0FE35E57DC51A1755BD59D8A43F24631D3DA34
x64—82ACEACC61827C77E4C113C3FEE279EBB21867C6489AF5790379A3A94488A433

Details

Homepage
https://libjpeg-turbo.org/
License
IJG license, Modified (3-clause) BSD License and zlib License
Publisher
libjpeg-turbo
Support
https://github.com/libjpeg-turbo/libjpeg-turbo/issues
Copyright
Copyright (C)2009-2026 D. R. Commander. All Rights Reserved.

Tags

jpeglibjpeg

Older versions (11)

3.2.0
x86—B43EA603F38ABF7F0997405E3857F26CBE9F07871201079B6958C191079778AE
x64—5A71EA596C573EA3B44C8E7B5E78613D3A28DC9490DC714E7222C9F63F55E454
3.1.4.1
x86—347BC5ACF65928FE5E8ABEACC897F73FFFF3BDBA1B327B473D31DA10DB629174
x64—FC65BD7B101F063A6CDD74F620A5F1757AE8ECE04CBEB45B2F55371DA99B8859
3.1.4
x86—8EA07ECC88A7AF544C8242AE63B341DB9C1880A30698263A026709006C877108
x64—84B2AFCAAA780A9013978195418093F14DEEC8FBD97A0D1FF4E6695658F5A6A2
3.1.3
x86—406709BEA143A8A1094E9C6DB05854E3548C5E6D734A7BF886EC46B6E131BB84
x64—6FE03BD8666B038E81F506C8239525A76AB034FAEBDDD532827180BFE46674F3
3.1.2
x86—56132D86399DC6C8ED822E5E0BD182D7E795AAABDF6F8DF50572272AE0ADE78F
x64—AB82AE062BD277FFBF42BAF866BA4019F139E9E84C87663C403A3C7D5DCA192D
3.1.1
x86—A978623DFF49C109599480C6D4F57D723EACBE113023528F669B00717BF95842
x64—B1C5A13774C31461BC78DD97A80CCB054B9F5B53AEF28D1AE36681320AD38929
3.1.0
x86—24DF4557587521BABEE22E297DB93B24C5F8061FE812294887A9348E176E43B4
x64—78E32F0144A0B2CB419A7D6E8EEA34303B4D9C7A4C30F4026459DAC280AD2D01
3.0.4
x86—043DFD0761CA69F8EF496A9F9CF2F59A1CE53D2C5475C391FC1A2143BBD9D9C1
x64—8814E0D2BABC690B54E4EE6D501AA7812511A28ADDB393BC76806903DD8EB97F
3.0.3
x86—AFE9B0C61932EDD2E11757586AFB40BE1A283ED82A3A3F1F4735261AA40985B3
x64—62A8B30501BFEB01CEF518593A52D8ABEC15030636ECBFF19249C41ACA810623
3.0.2
x86—6BF8E38A51A2ED86D0865A181D7BF3B12B7EF2C9904E620C2B8CEBF1E608003A
x64—7BABBA8C2C47C05ABBB93024D580DEFF903918006D1888FA8A3F881CD62F47CE
3.0.0
x86—ECE29751FBEDEF6867CB0200943216B848C82EED354F81DD58CA3930472D5A1F
x64—B9D7016DCEC0EFA5948ADEC19E12A81B2AFF70396B2F4843E91BA5CBCBE0D9AD