Voltar ao ranking

libjxl/libjxl

C++

JPEG XL image format reference implementation

image-compressionencoderdecodercodeclossless-compression-algorithmlossy-compressionlossy-image-compressionlossylossless-image-compressionlossless-imagesphotographyphotos
Crescimento de estrelas
Estrelas
3.6k
Forks
374
Crescimento semanal
Issues
387
1k2k3k
mai. de 2021jan. de 2023out. de 2024jul. de 2026
README

JPEG XL reference implementation

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

JXL logo

[!IMPORTANT] Security Update: It is highly recommended to update to v0.12 ASAP due to numerous security fixes.

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: OpenEXR (.exr), GIF (.gif), JPEG (.jpg/.jpeg), NetPBM (.pam/.pgm/.ppm), Portable FloatMap (.pfm), PGX Test Format (.pgx), Portable Network Graphics (.png), Animated PNG (.png/.apng), and JPEG XL itself (.jxl).

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.

Repositórios relacionados
Curzibn/Luban

Luban 2(鲁班 2) —— 高效简洁的 Android 图片压缩工具库,像素级还原微信朋友圈压缩策略。(An efficient and concise Android image compression library that closely replicates the compression strategy of WeChat Moments.)

CApache License 2.0lubanandroid
13.8k2.3k
LuckSiege/PictureSelector

Picture Selector Library for Android or 图片选择器

JavaMavenApache License 2.0androidandroid-image-selector
13.6k3.1k
zetbaitsu/Compressor

An android image compression library.

Kotlincompressorphotos
7.2k963
Lymphatus/caesium-image-compressor

Caesium is an image compression software that helps you store, send and share digital pictures, supporting JPG, PNG, WebP and TIFF formats. You can quickly reduce the file size (and resolution, if you want) by preserving the overall quality of the image.

C++GNU General Public License v3.0image-compressioncaesium
saerasoft.com/caesium
6.1k353
fengyuanchen/compressorjs

JavaScript image compressor.

JavaScriptnpmMIT Licensejavascriptimage-compression
fengyuanchen.github.io/compressorjs/
5.8k452
imazen/imageflow

High-performance image manipulation for web servers. Includes imageflow_server, imageflow_tool, and libimageflow

Rustcrates.ioGNU Affero General Public License v3.0image-serverimage-compression
docs.imageflow.io
4.4k144
meowtec/Imagine

🖼️ PNG/JPEG optimization app for macOS, Windows and Linux.

TypeScriptnpmMIT Licenseimage-compressionsave-for-web
4.4k316
oxipng/oxipng

Multithreaded PNG optimizer written in Rust

Rustcrates.ioMIT Licenseimage-compressionimage-optimization
4.1k153
kyleduo/TinyPNG4Mac

Native client of TinyPNG on macOS

SwiftMIT Licensetinypngtinypng4mac
4k292
FLIF-hub/FLIF

Free Lossless Image Format

C++Otherimage-compressionencoder
3.7k232
chrissimpkins/Crunch

Insane(ly slow but wicked good) PNG image optimization

PythonPyPIOtherpngpng-compression
3.4k149
aoguai/LiYing

LiYing is an automated photo processing program designed for automating the post-processing workflow of ID photos in general photo studios. | LiYing 是一套适用于自动化 完成一般照相馆后期证件照处理流程的照片自动处理的程序。

PythonPyPIGNU Affero General Public License v3.0background-replacementimage-compression
3.2k271