Menu

#133 JPEG-XL image support

Git
open
nobody
5
2024-02-05
2023-11-07
Lomel Nius
No

JPEG-XL is a new image file format, that includes features that are quite benefitial for comic books. It allows for a lossless recompression of jpg images, while reducing file size by ~20%, which is perfect for archival purposes. It also provides "visually lossless" compression, which typically reduces file sizes of jpgs about 60-80%.
I have not found any comic book reader, that can display JPEG-XL (.jxl) images inside cbzs or cbrs currently. However, the CBconvert tool already supports the conversion to and from jxl files inside comic books.
With libjxl, there is already a cross-platform library available for encoding and decoding JPEG-XL files, which means an implementation should be not too complicated.

Discussion

  • Oddegamra

    Oddegamra - 2023-11-08

    MComix uses either Pillow or GdkPixbuf to decode image files, so it is able to decode all formats supported by one of the two libraries. From what I can see, Pillow itself has no working implementation. The issue contains links to two obscure plugins, which apparently need to be explicitly loaded in code to be usable.

    GdkPixbuf also has no built-in support for Jpeg-XL, and no plans to add new formats to the core package. However, libjxl provides a plugin for GdkPixbuf in their source tree. Installing this plugin should in theory allow MComix to open .jxl images without any further modifications. However, only a few distributions seem to ship this plugin in their libjxl package manager (it appears that Arch Linux and Gentoo do, for example).

    If you're feeling adventurous, I'd advise to try your luck with the GdkPixbuf plugin first. As long as Jpeg-XL isn't widely spread as image format, I feel it would be overkill to add a specialized image handler just for this format.

     
  • Oddegamra

    Oddegamra - 2023-11-10

    I can now confirm that installing libjxl on MSYS2/Windows allows MComix to open .jxl files without any further modifications. I notice that the MSYS2 package does install the GdkPixbuf plugin that is part of libjxl, so as long as other Linux distributions do the same, it should work just as well.
    Now, the question remains how to convince pyinstaller to bundle this GdkPixbuf plugin for the Windows distribution.

     

Log in to post a comment.

MongoDB Logo MongoDB