Jump to content

JPEG XL: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Add source
https://chromium-review.googlesource.com/c/chromium/src/+/3988999 NOTE: JPEG XL format will be deprecated in Chrome 110 release.
Line 173: Line 173:


===Preliminary support===
===Preliminary support===
* [[Chromium (web browser)|Chromium]]<ref>{{cite web |url=https://bugs.chromium.org/p/chromium/issues/detail?id=1178058 |title=Issue 1178058: JPEG XL decoding support (image/jxl) in blink (tracking bug) |access-date=2021-03-01 |archive-date=2021-12-30 |archive-url=https://web.archive.org/web/20211230074423/https://bugs.chromium.org/p/chromium/issues/detail?id=1178058 |url-status=live}}</ref> – web browser; behind a feature flag in [[Google Chrome]] and [[Microsoft Edge#Release strategy|Edge Canary]]<ref>{{cite web|url=https://geekermag.com/how-to-enable-jpeg-xl-image-format-in-chrome-edge-and-firefox/|title=How to Enable JPEG XL Image format in Chrome, Edge, and Firefox|date=11 May 2021|publisher=}}</ref>
* [[Chromium (web browser)|Chromium]]<ref>{{cite web |url=https://bugs.chromium.org/p/chromium/issues/detail?id=1178058 |title=Issue 1178058: JPEG XL decoding support (image/jxl) in blink (tracking bug) |access-date=2021-03-01 |archive-date=2021-12-30 |archive-url=https://web.archive.org/web/20211230074423/https://bugs.chromium.org/p/chromium/issues/detail?id=1178058 |url-status=live}}</ref> – web browser; behind a feature flag in [[Google Chrome]] and [[Microsoft Edge#Release strategy|Edge Canary]]<ref>{{cite web|url=https://geekermag.com/how-to-enable-jpeg-xl-image-format-in-chrome-edge-and-firefox/|title=How to Enable JPEG XL Image format in Chrome, Edge, and Firefox|date=11 May 2021|publisher=}}</ref> Chrome 110 has deprecated jpegxl support and jpegxl will be removed in a future release.<ref>https://chromium-review.googlesource.com/c/chromium/src/+/3988999</ref>
* [[Firefox]]<ref>{{cite web |title=1539075 - (JPEG-XL) Implement support for JPEG XL (Image/JXL) |url=https://bugzilla.mozilla.org/show_bug.cgi?id=1539075 |access-date=2021-03-01 |url-status=live |archive-url=https://web.archive.org/web/20220104233107/https://bugzilla.mozilla.org/show_bug.cgi?id=1539075 |archive-date=2022-01-04}}</ref> – web browser; in testing (as [[Firefox#Experimental builds and ESR|Firefox Nightly]])
* [[Firefox]]<ref>{{cite web |title=1539075 - (JPEG-XL) Implement support for JPEG XL (Image/JXL) |url=https://bugzilla.mozilla.org/show_bug.cgi?id=1539075 |access-date=2021-03-01 |url-status=live |archive-url=https://web.archive.org/web/20220104233107/https://bugzilla.mozilla.org/show_bug.cgi?id=1539075 |archive-date=2022-01-04}}</ref> – web browser; in testing (as [[Firefox#Experimental builds and ESR|Firefox Nightly]])



Revision as of 10:59, 29 October 2022

JPEG XL
Filename extension
.jxl
Internet media type
image/jxl[a]
Magic numberFF 0A or 00 00 00 0C 4A 58 4C 20 0D 0A 87 0A[2]
Developed by
Latest release
0.7.0[3]
2022-09-21[3]
Type of formatLossy/lossless bitmap image format
Extended from
StandardISO/IEC 18181[5]
Open format?Yes (royalty-free)
Website

JPEG XL is a royalty-free raster-graphics file format that supports both lossy compression and lossless compression. It is designed to outperform existing raster formats and thus become their universal replacement.[6]

Name

The name consists of JPEG (for the Joint Photographic Experts Group, which is the committee which designed the format), X (part of the name of several JPEG standards since 2000: JPEG XT, JPEG XR, JPEG XS), and L (for long-term). The L was included because the authors' intention is for the format to replace the legacy JPEG and last as long too.[7]

Authors

The main authors of the specification are Jyrki Alakuijala, Jon Sneyers, and Luca Versari. Other collaborators are Sami Boukortt, Alex Deymo, Moritz Firsching, Thomas Fischbacher, Eugene Kliuchnikov, Robert Obryk, Alexander Rhatushnyak, Zoltan Szabadka, Lode Vandevenne, and Jan Wassenberg.

History

In August 2017, JTC1 / SC29 / WG1 (JPEG) published a call for proposals for JPEG XL, the next generation image encoding standard. [8] The proposals were submitted by September 2018, leading to a committee draft in July 2019. [9] It was mainly based on a combination of a proposal called PIK,[10] submitted by Google, and a proposal called FUIF[11] — itself based on FLIF — submitted by Cloudinary.

The bitstream was informally frozen on 24 December 2020 with the release of version 0.2 of the libjxl reference software.[12] The file format and core coding system were formally standardized on 13 October 2021 and 30 March 2022 respectively.[5][13]

Description

The JPEG XL call for proposals[8] talks about the requirement of a next generation image compression standard with substantially better compression efficiency (60% improvement) comparing to JPEG. The standard is expected to outperform the still image compression performance shown by HEIC, AVIF, WebP, and JPEG 2000. It also provides efficient lossless recompression options for images in the traditional/legacy JPEG format.

JPEG XL supports lossy compression and lossless compression of ultra-high-resolution images (up to 1 terapixel), up to 32 bits per component, up to 4099 components (including alpha transparency), animated images, and embedded previews. It has features aimed at web delivery such as advanced progressive decoding[14] and minimal header overhead, as well as features aimed at image editing and digital printing, such as support for multiple layers, CMYK, and spot colors. It is specifically designed to seamlessly handle wide color gamut color spaces with high dynamic range such as Rec. 2100 with the PQ or HLG transfer function.

Features

The main features are:[15][16][17]

  • More functions: Improved functionality and efficiency compared to traditional image formats (e.g. JPEG, GIF, and PNG).
  • Bigger dimensions allowed: Image dimensions of over a billion (230−1) pixels on each side.[18]
  • Lots of channels available: Up to 4099 channels: main channels: either one channel for grayscale, three channels for RGB, or four channels for CMYK. Additionally the rest of the channels as optional "extra" channels like alpha, depth, or thermal data.[18]
  • There can be multiple frames, with non-zero duration (for animation) or with zero duration (making them work more like layers in graphics software). Frames can be smaller (or larger) than the image canvas and can be blended in various ways.
  • Independent tiles: Decoding of sections of a large image by allowing images to be stored in tiles.
  • Progressive decoding: Mode specifically designed for responsive loading of large images depending on the viewing device's resolution.
  • Reversible JPEG transcoding: ~20% size reduction can be achieved.
  • Lossless encoding: Includes lossless alpha encoding.
  • Support for both photographic and synthetic imagery: The format features two complementary modes that can be used depending on the image contents.
  • Graceful quality degradation across a large range of bitrates: Quality loss isn't as abrupt as with older formats.
  • Perceptually optimized reference encoder: It uses by default perceptual color space, adaptive quantization, and conservative default settings.
  • Support for wide color gamut and HDR: JPEG XL has built-in support for various color spaces, transfer curves, and high screen brightness.
  • Support for animated content: For encoding realistic content regular video codecs are preferred.
  • Efficient encoding and decoding without requiring specialized hardware: JPEG XL is about as fast to encode and decode as old JPEG using libjpeg-turbo and an order of magnitude faster to encode and decode compared to HEIC with x265.[18] It is also parallelizable.
  • Royalty-free format with an open-source reference implementation: The software is available on GitHub under a 3-clause BSD license.[19]

Technical details

refer to caption
JPEG XL codec architecture diagram

JPEG XL is based on ideas from Google's PIK format and Cloudinary's FUIF format (which was in turn based on FLIF).[20]

The format is mainly based on two encoding modes:

  • VarDCT mode (variable-blocksize DCT) – it utilizes same DCT algorithm as legacy JPEG, but blocks, instead of being restricted to 8×8, come in various sizes (2×2 up to 256×256), non-square shapes (e.g. 16×8, 8×32, 32×64), or can use another transforms (AFV, Hornuss). It is only used for the 3 color channels, which typically use the XYB color space (although YCbCr is also supported in order to recompress legacy JPEG). The VarDCT mode is based on (lossy) PIK.
  • Modular mode - responsible, among other things, for efficient lossless content encoding, though it can also be used for lossy and near-lossless purposes. The mode is also used internally in VarDCT to save 2D data, i.e. everything except the AC (high-frequency) DCT coefficients, including the DC image (which is always a 1:8 subsampled image so also includes low-frequency AC coefficients in case block sizes larger than 8×8 are used), the weights of adaptive quantization, and filter strengths. Any additional/extra channels (e.g. alpha, depth, thermal, spot colors, etc.) are always encoded in Modular mode. This mode is based on FUIF, combined with elements of lossless PIK, lossless WebP, and new ideas that have been developed during the collaborative phase of the standardization process.[21]

Modular mode allows lossy compression with the help of a modified Haar transform called "squeeze", which has progressive properties: the quality of the image increases with the amount of data loaded. One of the ways VarDCT-based images can be loaded (more) progressively is by saving the DC coefficients in a separate "DC frame" that uses Modular squeeze, allowing previews corresponding to 1:16, 1:32 etc subsampled images. Squeeze can also be used to encode the alpha channel progressively together with VarDCT-encoded color channels, making both modes work in tandem. Lossy modes typically use the XYB color space derived from LMS.[22]

JPEG XL defaults to a visually near-lossless setting that still provides good compression.[18]

These modes can be assisted by separate modeling of specific image features called:

  • Splines for coding e.g. hairs (not yet used by the reference encoder).
  • Repeating "patches" like text, dots, or sprites.
  • Noise synthesis: since noise is hard to compress, it is better to separate it out and then regenerate the noise in the decoder. This is similar to film grain synthesis in modern video codecs like AV1, although JPEG XL's noise synthesis is not aiming to mimick the granularity of analog photographic film, but rather to model the photon noise at the pixel level like what you get on a digital camera at high ISO settings.

JPEG XL can losslessly transcode a widely-supported subset of JPEG files by directly copying JPEG's DCT block coefficients to 8×8 VarDCT blocks, making smaller file sizes possible due to JPEG XL's superior entropy coding. This process is reversible, allowing the original JPEG file to be reconstructed bit-for-bit, although constraints limit support for some files.[23]

Prediction is run using a pixel-by-pixel decorrelator without side information, including a parameterized self-correcting weighted ensemble of predictors. Context modeling includes specialized static models and powerful meta-adaptive models that take local error into account, with a signaled tree structure and predictor selection per context. Entropy coding is LZ77-enabled and can use either asymmetric numeral systems or Prefix codes (useful for low-complexity encoders, or reducing the overhead of short streams).[citation needed]

Animated (multi-frame) images do not perform advanced inter-frame prediction, though some rudimentary inter-frame coding tools are available:

  • Frames can be smaller than the full canvas size, leaving other pixels untouched.
  • Frames support several blending modes in addition to replacing previous frames, such as addition or multiplication.[24]
  • Up to four frames can be remembered and referenced by later frames, using the "patches" coding tool.

Software

Codec implementations

JPEG XL Reference Software (libjxl)
Initial releaseDecember 27, 2019; 4 years ago (2019-12-27)[25]
Stable release
0.7 / September 21, 2022; 22 months ago (2022-09-21)
Repositoryhttps://github.com/libjxl/libjxl[26] Edit this on Wikidata
Written inC++
Operating system
LicenseNew BSD License (previously Apache License 2.0)
Websitejpeg.org/jpegxl Edit this on Wikidata
  • JPEG XL Reference Software (libjxl)
    • license: New BSD License (previously Apache License 2.0)
    • contains (among others):
      • encode/decode library libjxl
      • encoder cjxl
      • decoder djxl
      • fast lossless-only encoder fjxl
      • tool for benchmarking speed and quality of image codecs benchmark_xl
      • GIMP and Gtk pixbuf plugin file-jxl
  • J40: Independent, self-contained JPEG XL decoder [1]
    • license: MIT License No Attribution
    • C99 single header library (no dependencies)
    • In Roman numerals, "XL" denotes 40, hence the name

Official support

Unofficial support

Preliminary support

Standardization status

Common Name Part First public release date (First edition) ISO/IEC Number Formal Title
JPEG XL Part 1 30 March 2022 ISO/IEC 18181-1 JPEG XL Image Coding System — Part 1: Core coding system[5]
Part 2 13 October 2021 ISO/IEC 18181-2 JPEG XL Image Coding System — Part 2: File format[13]
Part 3 3 October 2022 ISO/IEC 18181-3 JPEG XL Image Coding System — Part 3: Conformance testing
Part 4 5 August 2022 ISO/IEC 18181-4 JPEG XL Image Coding System — Part 4: Reference software

Notes

  1. ^ This is unofficial, but de-facto. See the official list of media types.[1]

References

  1. ^ "Media Types". IANA. Archived from the original on 2022-10-21. Retrieved 2022-10-21.
  2. ^ "libjxl/doc/format_overview.md". GitHub. Archived from the original on 2022-10-20. Retrieved 2022-10-20.
  3. ^ a b "libjxl v0.7.0 released". GitHub. 2022-09-21. Archived from the original on 2022-10-21. Retrieved 2022-10-21.
  4. ^ a b "fuif/README.md". GitHub. 2019-04-04. Archived from the original on 2021-04-24.
  5. ^ a b c ISO/IEC 18181-1:2022 Information technology — JPEG XL image coding system — Part 1: Core coding system.
  6. ^ "Can JPEG XL Become the Next Free and Open Image Format? - Slashdot". 2021-02-20. Archived from the original on 2021-12-30.
  7. ^ "Support for reading/Writing JPEG XL images (#4681) · Issues · GNOME / GIMP". 2021-02-26. Archived from the original on 2021-12-30.
  8. ^ a b "N79010 Final Call for Proposals for a Next-Generation Image Coding Standard (JPEG XL)" (PDF). ISO/IEC JTC 1/SC 29/WG 1 (ITU-T SG16). 15 April 2018.
  9. ^ Rhatushnyak, Alexander; Wassenberg, Jan; Sneyers, Jon; Alakuijala, Jyrki; Vandevenne, Lode; Versari, Luca; Obryk, Robert; Szabadka, Zoltan; Kliuchnikov, Evgenii; Comsa, Iulia-Maria; Potempa, Krzysztof; Bruse, Martin; Firsching, Moritz; Khasanova, Renata; Ruud van Asseldonk; Boukortt, Sami; Gomez, Sebastian; Fischbacher, Thomas (2019). "Committee Draft of JPEG XL Image Coding System". arXiv:1908.03565 [eess.IV].
  10. ^ "PIK, A new lossy/lossless image format for photos and the internet". Retrieved 2022-10-17.
  11. ^ "FUIF, Free Universal Image Format". Retrieved 2022-10-17.
  12. ^ "v0.2 JPEG XL Reference Software". GitLab. 2021-02-19. Archived from the original on 2021-10-20.
  13. ^ a b ISO/IEC 18181-2:2021 Information technology — JPEG XL image coding system — Part 2: File format.
  14. ^ "Using Saliency in progressive JPEG XL images". Retrieved 2022-10-17.
  15. ^ "JPEG XL reaches Committee Draft". JPEG.org. 2019-08-03. Archived from the original on 2019-08-03. Retrieved 2019-08-03. The current contributors have committed to releasing it publicly under a royalty-free and open source license.
  16. ^ "JPEG XL White Paper" (PDF). JPEG.org. 2021-01-29. Archived (PDF) from the original on 2 May 2021. Retrieved 2021-03-17.
  17. ^ "JPEG XL vs. AVIF - Page 6". encode.su. Retrieved 2022-10-22.
  18. ^ a b c d Sneyers, Jon (26 May 2020). "How JPEG XL Compares to Other Image Codecs". Cloudinary. Archived from the original on 2021-12-30. Retrieved 2021-02-19.
  19. ^ "libjxl/libjxl: JPEG XL image format reference implementation". GitHub. Archived from the original on 2022-05-22. Retrieved 2022-06-05.
  20. ^ "FLIF - Free Lossless Image Format". Archived from the original on 2021-12-21. Retrieved 2021-04-06.
  21. ^ "FLIF, 3 Sep 2021, jonsneyers comment".
  22. ^ Alakuijala, Jyrki; van Asseldonk, Ruud; Boukortt, Sami; Szabadka, Zoltan; Bruse, Martin; Comsa, Iulia-Maria; Firsching, Moritz; Fischbacher, Thomas; Kliuchnikov, Evgenii; Gomez, Sebastian; Obryk, Robert; Potempa, Krzysztof; Rhatushnyak, Alexander; Sneyers, Jon; Szabadka, Zoltan; Vandervenne, Lode; Versari, Luca; Wassenberg, Jan (6 September 2019). Tescher, Andrew G; Ebrahimi, Touradj (eds.). "JPEG XL next-generation image compression architecture and coding tools". Applications of Digital Image Processing XLII. 11137: 20. Bibcode:2019SPIE11137E..0KA. doi:10.1117/12.2529237. ISBN 9781510629677.
  23. ^ Sneyers, Jon (2021-12-10). "Feature request: allow jbrd to reconstruct a part of the file when it's not possible for the whole file". GitHub.
  24. ^ "JPEG XL reference implementation". GitHub. 3 December 2021. Archived from the original on 30 December 2021. Retrieved 24 June 2021.
  25. ^ "Update JPEG-XL with latest changes". GitHub. 2019-12-27. Retrieved 10 October 2022.
  26. ^ "PLEASE DO NOT OPEN NEW ISSUES HERE". Retrieved 27 May 2021.
  27. ^ "ImageMagick". Archived from the original on 2022-01-02. Retrieved 2021-03-01.
  28. ^ "0001845: JPEG XL - MantisBT". Archived from the original on 2021-11-07. Retrieved 2021-03-01.
  29. ^ "GThumb Image Viewer 3.11.3 Adds JPEG XL (.JXL) Support [Ubuntu PPA] | UbuntuHandbook". Archived from the original on 2021-12-30. Retrieved 2021-05-17.
  30. ^ "IrfanView PlugIns". Archived from the original on 2021-12-28. Retrieved 2021-12-03.
  31. ^ "ExifTool by Phil Harvey". Retrieved 2022-01-19.
  32. ^ "Release v8.11.0 · libvips/libvips · GitHub". GitHub. Retrieved 2022-01-30.
  33. ^ "KaOS 2021.06". Retrieved 2022-01-31.
  34. ^ "FFmpeg Lands JPEG-XL Support". www.phoronix.com. Retrieved 2022-04-24.
  35. ^ "KDE Ships Frameworks 5.89.0". KDE Community. 2021-12-11. Retrieved 2022-04-28.
  36. ^ "Krita 5.1.0 Released!". krita.org. 2022-08-18. Retrieved 2022-08-20.
  37. ^ "GIMP 2.10.32 Released". 2022-06-14. Retrieved 2022-06-15.
  38. ^ "Online Help for Chasys Draw IES: History". 2022-07-17. Retrieved 2022-07-18.
  39. ^ "HDR Output in Camera Raw". Archived from the original on 2022-10-21. Retrieved 2022-10-21.
  40. ^ "Qt-jpegxl-image-plugin". GitHub. December 2021. Archived from the original on 2021-03-03. Retrieved 2021-03-01.
  41. ^ "Jpeg Xl Wic". GitHub. 27 November 2021. Archived from the original on 30 December 2021. Retrieved 23 March 2021.
  42. ^ "JXLook". GitHub. December 2021. Archived from the original on 2021-12-30. Retrieved 2021-03-01.
  43. ^ "Issue 1178058: JPEG XL decoding support (image/jxl) in blink (tracking bug)". Archived from the original on 2021-12-30. Retrieved 2021-03-01.
  44. ^ "How to Enable JPEG XL Image format in Chrome, Edge, and Firefox". 11 May 2021.
  45. ^ https://chromium-review.googlesource.com/c/chromium/src/+/3988999
  46. ^ "1539075 - (JPEG-XL) Implement support for JPEG XL (Image/JXL)". Archived from the original on 2022-01-04. Retrieved 2021-03-01.