libjpeg-turbo-3.2.0

#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-1357

### Chapter 10. Graphics and Font Libraries

- Prev

  libheif-1.23.1

- Next

  libjxl-0.12.0

- Up
- Home

# libjpeg-turbo-3.2.0

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

### Note

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

### Package Information

- Download (HTTP): https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.2.0/libjpeg-turbo-3.2.0.tar.gz

- Download MD5 sum: a80f9f1c735b57d3cdd66daed1ba6bb4

- Download size: 2.5 MB

- Estimated disk space required: 59 MB (with tests)

- Estimated build time: 0.6 SBU (with tests; both using parallelism=4)

### libjpeg-turbo Dependencies

#### Required

CMake-4.4.2

#### Recommended

NASM-3.02 or yasm-1.3.0 (for building the package with optimized assembly routine)

## Installation of libjpeg-turbo

Install libjpeg-turbo by running the following commands:

    mkdir build &&
    cd    build &&

    cmake -D CMAKE_INSTALL_PREFIX=/usr        \
          -D CMAKE_BUILD_TYPE=RELEASE         \
          -D ENABLE_STATIC=FALSE              \
          -D CMAKE_INSTALL_DEFAULT_LIBDIR=lib \
          -D CMAKE_SKIP_INSTALL_RPATH=ON      \
          -D CMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-3.2.0 \
          .. &&
    make

To test the results, issue: make test.

Now, as the `root` user:

    make install

## Command Explanations

`-D CMAKE_SKIP_INSTALL_RPATH=ON`: This switch makes cmake remove hardcoded library search paths (rpath) when installing a binary executable file or a shared library. This package does not need rpath once it's installed into the standard location, and rpath may sometimes cause unwanted effects or even security issues.

`-D WITH_JPEG8=ON`: This switch enables compatibility with libjpeg version 8.

## Contents

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

### Short Descriptions

cjpeg | 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
djpeg | decompresses image files from JPEG/JFIF format to either PPM (PBMPLUS color format), PGM (PBMPLUS gray-scale format), BMP, or Targa format
jpegtran | is used for lossless transformation of JPEG files
rdjpgcom | displays text comments from within a JPEG file
tjbench | is used to benchmark the performance of libjpeg-turbo
wrjpgcom | inserts text comments into a JPEG file
`libjpeg.so` | contains functions used for reading and writing JPEG images

- Prev

  libheif-1.23.1

- Next

  libjxl-0.12.0

- Up
- Home