gecko-dev/third_party/jpeg-xl
Updatebot c02f0ef1c5 Bug 1873510 - Update libjxl to b26041c708d523ac53bb7d95d4f5c4a5d3b1ce30 r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D197950
2024-01-09 08:26:00 +00:00
..
cmake Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
debian Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
examples Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
lib Bug 1873510 - Update libjxl to b26041c708d523ac53bb7d95d4f5c4a5d3b1ce30 r=saschanaz 2024-01-09 08:26:00 +00:00
plugins Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
third_party Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
.bazelignore
.clang-format
.clang-tidy Bug 1859219 - Update libjxl to 4c23a53dde8840884f424bcca7c60947235fb421 r=tnikkel 2023-10-17 11:09:08 +00:00
.pre-commit-config.yaml Bug 1859219 - Update libjxl to 4c23a53dde8840884f424bcca7c60947235fb421 r=tnikkel 2023-10-17 11:09:08 +00:00
.readthedocs.yaml Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
AUTHORS Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
BUILD.bazel Bug 1873510 - Update libjxl to b26041c708d523ac53bb7d95d4f5c4a5d3b1ce30 r=saschanaz 2024-01-09 08:26:00 +00:00
BUILDING.md
BUILDING_Haiku.md
BUILDING_OSX.md
CHANGELOG.md Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
CMakeLists.txt Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
CONTRIBUTORS
LICENSE
MODULE.bazel Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
MODULE.bazel.lock Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
PATENTS
README.md Bug 1859219 - Update libjxl to 4c23a53dde8840884f424bcca7c60947235fb421 r=tnikkel 2023-10-17 11:09:08 +00:00
SECURITY.md
WORKSPACE Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
bash_test.sh Bug 1851413 - Update libjxl to 5d20fbe1cfcdb54bcc7880fc8a59bb9047d8c60f r=saschanaz 2023-09-11 09:34:56 +00:00
ci.sh Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
deps.sh Bug 1873510 - Update libjxl to b26041c708d523ac53bb7d95d4f5c4a5d3b1ce30 r=saschanaz 2024-01-09 08:26:00 +00:00
flake.lock Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00
flake.nix Bug 1870622 - Update libjxl to 1d1006ce9dbe4224c1299992b57f28a4f62df9b7 r=tnikkel 2024-01-02 18:05:20 +00:00

README.md

JPEG XL reference implementation

Build/Test Build/Test Cross Conformance CIFuzz Releases Doc OpenSSF Best Practices OpenSSF Scorecard codecov

JXL logo

This repository contains a reference implementation of JPEG XL (encoder and decoder), called libjxl. This software library is used by many applications that support JPEG XL.

JPEG XL was standardized in 2022 as ISO/IEC 18181. The core codestream is specified in 18181-1, the file format in 18181-2. Decoder conformance is defined in 18181-3, and 18181-4 is the reference software.

The library API, command line options, and tools in this repository are subject to change, however files encoded with cjxl conform to the JPEG XL specification and can be decoded with current and future djxl decoders or the libjxl decoding library.

Installation

In most Linux distributions, installing libjxl is just a matter of using the package management system. For example in Debian-based distributions: apt install libjxl-tools will install cjxl and djxl and other tools like benchmark_xl are available in the package libjxl-devtools. On MacOS, you can use Homebrew: brew install jpeg-xl.

libjxl packaging status

From the releases page the following can be downloaded:

  • Windows binaries
  • Debian and Ubuntu .deb packages

Of course you can also build libjxl from sources.

Usage

To encode a source image to JPEG XL with default settings:

cjxl input.png output.jxl

The desired visual fidelity can be selected using the --distance parameter (in units of just-noticeable difference, where 0 is lossless and the most useful lossy range is 0.5 .. 3.0), or using --quality (on a scale from 0 to 100, roughly matching libjpeg). The encode effort can be selected using the --effort parameter.

For more settings run cjxl --help or for a full list of options run cjxl -v -v --help.

To decode a JPEG XL file run:

djxl input.jxl output.png

When possible cjxl/djxl are able to read/write the following image formats: .exr, .gif, .jpeg/.jpg, .pfm, .pgm/.ppm, .pgx, .png. Specifically for JPEG files, the default cjxl behavior is to apply lossless recompression and the default djxl behavior is to reconstruct the original JPEG file (when the extension of the output file is .jpg).

Benchmarking

For speed benchmarks on single images in single or multi-threaded decoding djxl can print decoding speed information. See djxl --help for details on the decoding options and note that the output image is optional for benchmarking purposes.

For more comprehensive benchmarking options, see the benchmarking guide.

Library API

Besides the libjxl library API documentation, there are example applications and plugins that can be used as a reference or starting point for developers who wish to integrate libjxl in their project.

License

This software is available under a 3-clause BSD license which can be found in the LICENSE file, with an "Additional IP Rights Grant" as outlined in the PATENTS file.

Please note that the PATENTS file only mentions Google since Google is the legal entity receiving the Contributor License Agreements (CLA) from all contributors to the JPEG XL Project, including the initial main contributors to the JPEG XL format: Cloudinary and Google.

Additional documentation

Codec description

Development process

Contact

If you encounter a bug or other issue with the software, please open an Issue here.

There is a subreddit about JPEG XL, and informal chatting with developers and early adopters of libjxl can be done on the JPEG XL Discord server.