Software:JPEG XL

From HandWiki
Short description: Raster-graphics file format supporting lossy and lossless compression
JPEG XL
JPEG XL logo.svg
Filename extension.jxl
Internet media typeimage/jxl[lower-alpha 1]
Magic numberFF 0A or 00 00 00 0C 4A 58 4C 20 0D 0A 87 0A[3]
Developed by
Type of formatLossy/lossless bitmap image format
Extended from
StandardISO/IEC 18181[5]
Website

JPEG XL is a royalty-free raster-graphics file format that supports both lossy 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 just 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]

  • Image dimensions of over a billion (230−1) pixels on each side.[18]
  • Up to 4099 channels. Main channels: either one channel for grayscale, three channels for RGB, or four channels for CMYK. The rest of the channels are optional and can be used to store alpha (either "straight" or "premultiplied"), 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. However, regular video codecs are still preferred for encoding realistic content.
  • 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 for any channel, including alpha.
  • 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 which uses a 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.
  • 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 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 is based from the 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. Lossy modes typically use the XYB color space derived from LMS.[21]
  • Modular mode is responsible, among other things, for efficient lossless content encoding and also for lossy and near-lossless purposes. Modular can also be 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 the modular mode. It was 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.[22] Modular mode allows lossy compression with the help of the modified Haar transform called "squeeze" which has progressive properties, 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. A squeeze transform can also be used to encode the alpha channel progressively together with VarDCT-encoded color channels, making both modes work in tandem.

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 it 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 codec 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 and it allows for 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).[16]

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.

Industry support and adoption

Besides Cloudinary, throughout JPEG XL's preliminary implementation in web browsers, various representatives of well-known industry brand names have publicly voiced support for JPEG XL as their preferred choice, including Facebook,[25][26] Adobe,[27][28] Intel and the Video Electronics Standards Association,[29][30] The Guardian ,[31][32] Flickr and SmugMug,[33] Shopify,[34] the Krita Foundation,[35] and Serif Ltd.[36]

Google's stance on JPEG XL is ambiguous, as they have contributed to the format but refrained from shipping an implementation of it in Chromium and Google Chrome.

Software

Codec implementations

JPEG XL Reference Software (libjxl)
Libjxl wordmark.svg
Libjxl 0.6.1 screenshot.png
Initial releaseDecember 27, 2019; 4 years ago (2019-12-27)[37]
Stable release
0.9.0 / December 22, 2023; 3 months ago (2023-12-22)
Written inC++
Operating system
LicenseNew BSD License (previously Apache License 2.0)
  • 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[38]
  • libjxl-tiny: a simpler encoder implementation of JPEG XL, aimed at photographic images without an alpha channel.[39]
    • license: New BSD License
  • jxlatte: Java JPEG XL decoder [40]
  • jxl_decode: A Python JPEG XL decoder.[41]
  • jpeg-xl-encode: a PHP JPEG XL wrapper for an encoder.[42]
  • hydrium: Fast, ultra-low-memory, streaming JPEG XL encoder written in portable C.[43]
    • license: BSD License
  • jxl-oxide: Small JPEG XL decoder written completely in Rust. [44]

Official software support

  • Apple Inc.[45]
  • Pale Moon v31.4.0 and later (v31.4.1 fixed wrong color of decoded JPEG XL images, v31.4.2 fixed JPEG-XL's transparency display for images with an alpha channel, and v32.0.0 support progressive decoding and animation for JPEG XL.)[50]
  • Epiphany 45[51] via the WebKitGTK engine[52]
  • ImageMagick – reading and writing of JPEG XL images
  • KDE applications can be built with KImageFormats plugin with native JPEG XL support. [53] This gives most KDE apps native support for both read and writing and works with all apps from the Dolphin file manager including Gwenview image viewer, Krita digital painting tool and DigiKam photo manager.
  • XnView – reading and writing of JPEG XL images[54]

Unofficial or indirect support

Preliminary web browser support

Support for JPEG XL in Chromium and Chrome web browsers was introduced for testing April 1, 2021[61] and removed on December 9, 2022 - with support removed in version 110.[62][63] The Chrome team cited a lack of interest from the ecosystem, insufficient improvements, and a wish to focus on improving existing formats as reasons for removing JPEG XL support.[61][64][62] The decision was met with opposition from the community, with many voicing support for JPEG XL on Chromium's bug tracker.[61][65][64] Jon Sneyers, co-author of the JPEG XL spec, has questioned the conclusions drawn by the Chrome team, saying: "I think there has been an unfortunate misinterpretation of the data ... which has unfortunately lead [sic] to an incorrect decision."[66] The decision was also criticized by Greg Farough from the Free Software Foundation, who said it demonstrated Google's "disturbing amount of control" over the web and web browsers.[67]

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

Rivals

Notes

  1. This is a provisional entry. See the official list of media types[1] and the provisional list[2].

References

  1. "Media Types". IANA. https://www.iana.org/assignments/media-types/media-types.xhtml. 
  2. "Provisional Media Types". IANA. https://www.iana.org/assignments/provisional-standard-media-types/provisional-standard-media-types.xhtml. 
  3. "JPEG XL Format Overview". GitHub. https://github.com/libjxl/libjxl/blob/f88745497118727f861cb00887cadcb395d10f1c/doc/format_overview.md. 
  4. 4.0 4.1 "fuif/README.md". GitHub. 2019-04-04. https://github.com/cloudinary/fuif/blob/3ed48249a9cbe68740aa4ea58098ab0cd4b87eaa/README.md. 
  5. 5.0 5.1 5.2 ISO/IEC 18181-1:2022 Information technology — JPEG XL image coding system — Part 1: Core coding system, https://www.iso.org/standard/77977.html 
  6. 6.0 6.1 "Can JPEG XL Become the Next Free and Open Image Format? - Slashdot". 2021-02-20. https://tech.slashdot.org/story/19/08/17/1855214/can-jpeg-xl-become-the-next-free-and-open-image-format. 
  7. "Support for reading/Writing JPEG XL images (#4681) · Issues · GNOME / GIMP". 2021-02-26. https://gitlab.gnome.org/GNOME/gimp/-/issues/4681. 
  8. 8.0 8.1 "N79010 Final Call for Proposals for a Next-Generation Image Coding Standard (JPEG XL)". ISO/IEC JTC 1/SC 29/WG 1 (ITU-T SG16). 15 April 2018. https://jpeg.org/downloads/jpegxl/jpegxl-cfp.pdf. 
  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". https://github.com/google/pik. 
  11. "FUIF, Free Universal Image Format". https://github.com/cloudinary/fuif. 
  12. "v0.2 JPEG XL Reference Software" (in en). 2021-02-19. https://gitlab.com/wg1/jpeg-xl/-/tags/v0.2. 
  13. 13.0 13.1 ISO/IEC 18181-2:2021 Information technology — JPEG XL image coding system — Part 2: File format, https://www.iso.org/standard/80617.html 
  14. "Using Saliency in progressive JPEG XL images". https://opensource.googleblog.com/2021/09/using-saliency-in-progressive-jpeg-xl-images.html. 
  15. "JPEG XL reaches Committee Draft". 2019-08-03. https://jpeg.org/items/20190803_press.html. "The current contributors have committed to releasing it publicly under a royalty-free and open source license." 
  16. 16.0 16.1 "JPEG XL White Paper". 2021-01-29. https://ds.jpeg.org/whitepapers/jpeg-xl-whitepaper.pdf. 
  17. "JPEG XL vs. AVIF - Page 6". https://encode.su/threads/3397-JPEG-XL-vs-AVIF?p=74397&viewfull=1#post74397. 
  18. 18.0 18.1 18.2 18.3 Sneyers, Jon (26 May 2020). "How JPEG XL Compares to Other Image Codecs". https://cloudinary.com/blog/how_jpeg_xl_compares_to_other_image_codecs. 
  19. "libjxl/libjxl: JPEG XL image format reference implementation" (in en). https://github.com/libjxl/libjxl. 
  20. "FLIF - Free Lossless Image Format". https://flif.info/#update. 
  21. Alakuijala, Jyrki; van Asseldonk, Ruud; Boukortt, Sami; Szabadka, Zoltan; Bruse, Martin; Comsa, Iulia-Maria; Firsching, Moritz; Fischbacher, Thomas et al. (6 September 2019). "JPEG XL next-generation image compression architecture and coding tools". in Tescher, Andrew G; Ebrahimi, Touradj. Applications of Digital Image Processing XLII. 11137. pp. 20. doi:10.1117/12.2529237. ISBN 9781510629677. Bibcode2019SPIE11137E..0KA. 
  22. "FLIF, 3 Sep 2021, jonsneyers comment". https://github.com/FLIF-hub/FLIF/issues/549#issuecomment-912335312. 
  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". https://github.com/libjxl/libjxl/issues/895#issuecomment-991148244. 
  24. "JPEG XL reference implementation". 3 December 2021. https://github.com/libjxl/libjxl/blob/95eea7e/lib/jxl/frame_header.h#L168-L207. 
  25. Andre, Erik (2021-04-20). "Statement of support by Facebook on Chromium's issue #1178058". https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c16. 
  26. Andre, Erik (2021-05-24). "Statement of support by Facebook on Firefox's issue #1539075" (in en). https://bugzilla.mozilla.org/show_bug.cgi?id=1539075. 
  27. Rosenthol, Leonard (2021-06-07). "Statement of support by Adobe on Firefox's issue #1539075" (in en). https://bugzilla.mozilla.org/show_bug.cgi?id=1539075. 
  28. Chan, Eric (2022-08-23). "Statement of support by Adobe on Chromium's issue #1178058". https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c61. 
  29. Wooster, Roland (2022-08-24). "Statement of support on Chromium's issue #1178058 by VESA's DisplayHDR Chairman and Principal Engineer at Intel's Client Computing Group". https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c61. 
  30. Wooster, Roland (2022-11-11). "Reinforced statement of support on Chromium's issue #1178058 by VESA's DisplayHDR Chairman and Principal Engineer at Intel's Client Computing Group". https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c189. 
  31. Chauvin, Mariot (2022-08-26). "Statement of support by The Guardian on Chromium's issue #1178058". https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c67. 
  32. Chauvin, Mariot (2022-01-13). "Statement of support by The Guardian on Firefox's issue #1539075" (in en). https://bugzilla.mozilla.org/show_bug.cgi?id=1539075. 
  33. MacAskill, Don (2022-01-04). "Statement of support by Flickr and SmugMug on Firefox's issue #1539075" (in en). https://bugzilla.mozilla.org/show_bug.cgi?id=1539075. 
  34. Bendell, Colin (2022-10-17). "Statement of support by Shopify on Chromium's issue #1178058". https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c79. 
  35. Rempt, Rempt (2022-11-10). "Statement of support by the Krita Foundation on Chromium's issue #1178058". https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c190. 
  36. Brightman, Tony (2022-11-11). "Statement of support by Serif Ltd.'s SerifLabs on Chromium's issue #1178058". https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c192. 
  37. "Update JPEG-XL with latest changes.". 2019-12-27. https://github.com/libjxl/libjxl/commit/ff09371267315c39fe0220082943c5834db04ab9. 
  38. J40: Independent, self-contained JPEG XL decoder
  39. "libjxl-tiny". 4 November 2022. https://github.com/libjxl/libjxl-tiny. 
  40. "jxlatte". 23 December 2022. https://github.com/thebombzen/jxlatte. 
  41. "jxl_decode". 8 June 2023. https://github.com/Fraetor/jxl_decode. 
  42. Siipola, Johannes (2022-10-31), JPEG XL Encode, https://github.com/joppuyo/jpeg-xl-encode, retrieved 2022-11-29 
  43. Leo Izen (6 March 2023). "hydrium". https://github.com/thebombzen/hydrium. 
  44. Wonwoo Choi (29 October 2023). "jxl-oxide". https://github.com/tirr-c/jxl-oxide. 
  45. "JPEG XL: How It Started, How It's Going". Cloudinary. 12 July 2023. https://cloudinary.com/blog/jpeg-xl-how-it-started-how-its-going. 
  46. "macOS 14 Sonoma: The Ars Technica review" (in en). 2023-10-29. https://arstechnica.com/gadgets/2023/09/macos-14-sonoma-the-ars-technica-review/11/. 
  47. "Explore media formats for the web - WWDC23 - Videos" (in en). https://developer.apple.com/videos/play/wwdc2023/10122/. 
  48. "Safari 17 Beta Release Notes" (in en-US). https://docs.developer.apple.com/documentation/safari-release-notes/safari-17-release-notes. 
  49. "208235 – Support JPEG XL images". https://bugs.webkit.org/show_bug.cgi?id=208235. 
  50. "Pale Moon - Release Notes for Archived Versions". https://www.palemoon.org/releasenotes-archived.shtml. 
  51. "Support for JPEG-XL (#2040) · Issues · GNOME / Epiphany · GitLab" (in en). 2023-04-12. https://gitlab.gnome.org/GNOME/epiphany/-/issues/2040. 
  52. "257871 – [CMake Enable JPEG XL by default, no longer experimental"]. https://bugs.webkit.org/show_bug.cgi?id=257871. 
  53. "KImageFormats". https://invent.kde.org/frameworks/kimageformats. 
  54. "Supported graphic and image formats". https://www.xnview.com/en/image_formats/. 
  55. "Jpeg Xl Wic". 27 November 2021. https://github.com/mirillis/jpegxl-wic. 
  56. "JXL WIN Thumb". 11 June 2022. https://github.com/saschanaz/jxl-winthumb/releases. 
  57. "JXLook". December 2021. https://github.com/yllan/JXLook. 
  58. "libjxl gdk-pixbuf plugin" (in en). https://github.com/libjxl/libjxl. 
  59. "Qt jpegxl image plugin". https://github.com/novomesk/qt-jpegxl-image-plugin. 
  60. "1539075 - (JPEG-XL) Implement support for JPEG XL (Image/JXL)". https://bugzilla.mozilla.org/show_bug.cgi?id=1539075. 
  61. 61.0 61.1 61.2 "Issue 1178058: JPEG XL decoding support (image/jxl) in blink (tracking bug)". https://bugs.chromium.org/p/chromium/issues/detail?id=1178058. 
  62. 62.0 62.1 Proven, Liam. "Google drops forthcoming version of JPEG from Chromium" (in en). https://www.theregister.com/2022/10/31/jpeg_xl_axed_chrome/. 
  63. JPEG XL support
  64. 64.0 64.1 Sneyers, Jon (2022-11-02). "The Case for JPEG-XL". Cloudinary Blog. https://cloudinary.com/blog/the-case-for-jpeg-xl. 
  65. Shankland, Stephen (2022-11-03). "Chrome Banishes JPEG XL Photo Format That Could Save Phone Space". https://www.cnet.com/tech/computing/chrome-banishes-jpeg-xl-photo-format-that-could-save-phone-space/. 
  66. Sneyers, Jon (2022-12-14). "Re: Intent to Prototype: JPEG XL decoding support (image/jxl) in blink". blink-dev (Mailing list). Retrieved 2022-12-30.
  67. Purdy, Kevin (2023-04-17). "FSF: Chrome's JPEG XL killing shows how the web works under browser hegemony" (in en-us). https://arstechnica.com/gadgets/2023/04/free-software-group-decries-google-dropping-space-saving-jpeg-xl-format/. 

External links