Bug 703844 - Add support for JXL (JPEG XL) format
Summary: Add support for JXL (JPEG XL) format
Status: RESOLVED WONTFIX
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: unspecified
Hardware: PC Windows 10
: P4 enhancement
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-11 15:38 UTC by eddie
Modified: 2021-05-12 11:09 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Sebastian Rasmussen 2021-05-11 16:22:51 UTC
In what context would MuPDF encounter JPEG XL images? PDF 2.0 doesn't support them, neither does XPS. Maybe you are thinking of EPUB or CBZ? Are there real world examples of usage?

Since MuPDF isn't mainly an image viewer I'm not convinced that adding support for JPEG XL would make sense. Perhaps if it is included in PDF 2.5 or if there are other current compelling reasons..?
Comment 2 eddie 2021-05-11 17:01:48 UTC
(In reply to Sebastian Rasmussen from comment #1)
> Maybe you are thinking of EPUB or CBZ?
Yeah, I am here for CBZ.

JXL is still a new format and not very common, but that will change faster than we might think. Chrome and Firefox already support it as an experimental feature. Facebook will use JXL when Chrome turns it on by default. The format has many special features, one of which is the ability to losslessly transcode JPGs. This makes it possible to transcode all CBZs from JPG to JXL without losing any pixel and save up to 20% of their file size. Personally I'll get from it about 20 GiB. Some online library - I can't even imagine. And all original JPGs can be decoded back.

I'm afraid that this could turn into a vicious circle. When developer A waits for developer B to add a new format, and developer B waits for the same from developer A. In the end, everyone suffers, because they're just stuck and can't use something new and improved because it's just not supported by all other programs yet.
Comment 3 Sebastian Rasmussen 2021-05-12 11:09:11 UTC
> JXL is still a new format and not very common, but that will change faster
> than we might think. Chrome and Firefox already support it as an experimental
> feature. Facebook will use JXL when Chrome turns it on by default.

It may become prevalent, but I think we ought wait for that to happen before
we consider adding support for JPEG XL in MuPDF. 

Remember that when we add dependencies such as a new image decoding library
we need to make it build on many platforms and we need to keep updating
and/or fixing bugs in the library more or less forever.

If JPEG XL was added to the e.g. PDF 2.2 specification then the situation
would be very different we'd essentially be forced to support it to gain
full support for one of our core file formats.

So thanks for pointing to the reference library and letting us know how much
support it has gained so far, but at this point we'll wait a bit longer before
we add support for JPEG XL.