Introduction to libjpeg-turbo

libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to accelerate baseline JPEG compression and decompression. libjpeg is a library that implements JPEG image encoding, decoding and transcoding.

This package is known to build and work properly using an LFS-9.0 platform.

Package Information

libjpeg-turbo Dependencies


CMake-3.15.2 and NASM-2.14.02 or yasm-1.3.0

User Notes:

Installation of libjpeg-turbo

Install libjpeg-turbo by running the following commands:

mkdir build &&
cd    build &&

      -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.2 \
      .. &&

To test the results, issue: make test.



If installing libjpeg-turbo over an older jpeg installation, not all library symbolic links are updated properly. To fix this before installation, run the following as the root user:

rm -f /usr/lib/*

Now, as the root user:

make install

Command Explanations

-DWITH_JPEG8=ON: This switch enables compatibility with libjpeg version 8.


Installed Programs: cjpeg, djpeg, jpegtran, rdjpgcom, tjbench, and wrjpgcom
Installed Libraries: and
Installed Directories: /usr/share/doc/libjpeg-turbo-2.0.2

Short Descriptions


compresses image files to produce a JPEG/JFIF file on the standard output. Currently supported input file formats are: PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale format), BMP, and Targa.


decompresses image files from JPEG/JFIF format to either PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale format), BMP, or Targa format.


is used for lossless transformation of JPEG files.


displays text comments from within a JPEG file.


is used to benchmark the performance of libjpeg-turbo.


inserts text comments into a JPEG file.

contains functions used for reading and writing JPEG images.

Last updated on 2019-08-16 20:24:05 -0700