- Notifications
You must be signed in to change notification settings - Fork0
JPEG XL image format reference implementation
License
0fbcb238c0/libjxl
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository contains a reference implementation of JPEG XL (encoder anddecoder), calledlibjxl
. This software library isused by many applications that support JPEG XL.
JPEG XL was standardized in 2022 asISO/IEC 18181.Thecore codestream is specified in 18181-1,thefile format in 18181-2.Decoder conformance is defined in 18181-3,and 18181-4 is thereference software.
The library API, command line options, and tools in this repository are subjectto change, however files encoded withcjxl
conform to the JPEG XL specificationand can be decoded with current and futuredjxl
decoders or thelibjxl
decoding library.
In most Linux distributions, installinglibjxl
is just a matter of using the package management system.For example in Debian-based distributions:apt install libjxl-tools
will installcjxl
anddjxl
and other tools likebenchmark_xl
are available in the packagelibjxl-devtools
.On MacOS, you can useHomebrew:brew install jpeg-xl
.
From thereleases page the following can be downloaded:
- Windows binaries
- Debian and Ubuntu .deb packages
Of course you can alsobuild libjxl from sources.
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).Theencode effort can be selected using the--effort
parameter.
For more settings runcjxl --help
or for a full list of optionsruncjxl -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 defaultcjxl
behavior is to apply losslessrecompression and the defaultdjxl
behavior is to reconstruct the originalJPEG file (when the extension of the output file is.jpg
).
For speed benchmarks on single images in single or multi-threaded decodingdjxl
can print decoding speed information. Seedjxl --help
for detailson the decoding options and note that the output image is optional forbenchmarking purposes.
For more comprehensive benchmarking options, see thebenchmarking guide.
Besides thelibjxl
libraryAPI documentation,there areexample applications andplugins that can be used as a reference orstarting point for developers who wish to integratelibjxl
in their project.
This software is available under a 3-clause BSD license which can be found intheLICENSE file, with an "Additional IP Rights Grant" as outlined inthePATENTS file.
Please note that the PATENTS file only mentions Google since Google is the legalentity receiving the Contributor License Agreements (CLA) from all contributorsto the JPEG XL Project, including the initial main contributors to the JPEG XLformat: Cloudinary and Google.
- JPEG XL Format Overview
- Introductory paper (open-access)
- XL Overview - a brief introduction to the source code modules
- JPEG XL white paper
- JPEG XL official website
- JPEG XL community website
- More information on testing/build options
- Git guide for JPEG XL - for developers
- Fuzzing - for developers
- Building Web Assembly artifacts
- Test coverage on Codecov.io - fordevelopers
- libjxl documentation on readthedocs.io
- The development of jpegli, the improved JPEG encoder and decoder, will continue athttps://github.com/google/jpegli
If you encounter a bug or other issue with the software, please open an Issue here.
There is asubreddit about JPEG XL, andinformal chatting with developers and early adopters oflibjxl
can be done on theJPEG XL Discord server.
About
JPEG XL image format reference implementation
Resources
License
Code of conduct
Security policy
Stars
Watchers
Forks
Packages0
Languages
- C++88.6%
- C4.2%
- Python2.4%
- CMake1.8%
- Shell1.7%
- Starlark0.5%
- Other0.8%