libjxl-0.12.0

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

### Chapter 10. Graphics and Font Libraries

- Prev

  libjpeg-turbo-3.2.0

- Next

  libliftoff-0.5.0

- Up
- Home

# libjxl-0.12.0

## Introduction to libjxl

The libjxl package contains the reference implementation of the JPEG XL image format.

### Note

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

### Package Information

- Download (HTTP): https://github.com/libjxl/libjxl/archive/v0.12.0/libjxl-0.12.0.tar.gz

- Download MD5 sum: a0fd3ac7b474525dadb99bbcb5d814f9

- Download size: 1.7 MB

- Estimated disk space required: 67 MB

- Estimated build time: 1.0 SBU (with parallelism=4)

### libjxl Dependencies

#### Required

Brotli-1.2.0, CMake-4.4.2, giflib-6.1.3, highway-1.4.0, Little CMS-2.19.1, libjpeg-turbo-3.2.0, and libpng-1.6.58

#### Optional

asciidoc-10.2.1 (for man pages), Doxygen-1.18.0 and Graphviz-15.1.1 (for documentation), gdk-pixbuf-2.44.7 (for the plugin), Java-21.0.10 (for the JAR), libavif-1.4.2, libwebp-1.6.0, gtest, OpenEXR, sjpeg, and skcms

## Installation of libjxl

Install libjxl by running the following commands:

    mkdir build &&
    cd    build &&

    cmake -D CMAKE_INSTALL_PREFIX=/usr             \
          -D CMAKE_BUILD_TYPE=Release              \
          -D BUILD_TESTING=OFF                     \
          -D BUILD_SHARED_LIBS=ON                  \
          -D JPEGXL_ENABLE_SKCMS=OFF               \
          -D JPEGXL_ENABLE_SJPEG=OFF               \
          -D JPEGXL_ENABLE_PLUGINS=OFF             \
          -D JPEGXL_INSTALL_JARDIR=/usr/share/java \
          -G Ninja ..                              &&
    ninja

This package does come with a test suite, but it requires gtest, which is not in BLFS.

Now, as the `root` user:

    ninja install

## Command Explanations

`-D BUILD_TESTING=OFF`: This parameter disables the tests because they require gtest, which is not in BLFS. If you wish to run the tests and have gtest installed, remove this parameter.

`-D BUILD_SHARED_LIBS=ON`: This parameter enables building shared versions of the libraries instead of static ones.

`-D JPEGXL_ENABLE_SKCMS=OFF`: This parameter disables building support for Skia's skcms since it is not necessary for BLFS purposes and requires skcms.

`-D JPEGXL_ENABLE_SJPEG=OFF`: This parameter disables support for SimpleJPEG since it is not necessary for BLFS purposes and requires sjpeg.

`-D JPEGXL_ENABLE_PLUGINS=OFF`: This parameter disables building the JPEG XL loader plugins for GIMP and gdk-pixbuf. The GIMP plugin isn't compatible with the GIMP version in the book, and the gdk-pixbuf plugin is useless when gdk-pixbuf is built with its recommended dependency glycin.

`-D JPEGXL_INSTALL_JARDIR=/usr/share/java`: This parameter places the JAR file for JPEG XL support in the correct directory if Java-21.0.10 is installed.

## Contents

Installed Programs: benchmark_xl, cjxl, djxl, and jxlinfo
Installed Libraries: libjxl.so, libjxl_cms.so, libjxl_extras_codec.a, libjxl_jni.so, and libjxl_threads.so
Installed Directories: /usr/include/jxl

### Short Descriptions

benchmark_xl | runs performance benchmarks against libjxl
cjxl | compresses images into JPEG XL format
djxl | decompresses images from JPEG XL format into other formats
jxlinfo | displays information about JPEG XL images
`libjxl.so` | contains the reference implementation of the JPEG XL standard
`libjxl_cms.so` | contains support for Little CMS in libjxl
`libjxl_extras_codec.a` | contains additional codec support for JPEG XL images
`libjxl_jni.so` | contains a Java interface to support JPEG XL on systems where Java-21.0.10 was installed at build time
`libjxl_threads.so` | contains threading functions for JPEG XL
`libpixbufloader-jxl.so` | contains a loader for gdk-pixbuf to allow it to load JPEG XL images

- Prev

  libjpeg-turbo-3.2.0

- Next

  libliftoff-0.5.0

- Up
- Home