Bug 451584 - Add support for the JPEG XR format
Summary: Add support for the JPEG XR format
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kimageformats
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: Alex Merry
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-16 18:14 UTC by lynne
Modified: 2024-09-30 05:41 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lynne 2022-03-16 18:14:02 UTC
JPEG XR, or JPEG Extended Range, is an image format created by Microsoft based on their preexisting "Windows Media Photo" format. Unlike that format, this one is an open format, and Microsoft has provided a reference implementation library, along with documentation for the format, which is available here:
https://github.com/4creators/jxrlib

The GitHub link is a reupload of the original Microsoft repository, which was hosted on their now-inactive Codeplex forge.

The library is BSD licensed (specifically, the 2-Clause BSD license).

It is perhaps worth noting that Microsoft owns several patents relating to the JPEG XR format, however in the interest of encouraging the format's adoption, they have (along with providing this reference implementation) promised, via their Microsoft Community Promise programme, not to enforce its patents against any implementers:
https://docs.microsoft.com/en-us/openspecs/dev_center/ms-devcentlp/8b8d1b7a-a10a-4667-9558-6d9c43adf60d

While no cameras currently save their images in this format, one place where one might naturally encounter this format is by uploading screenshots taken with the Microsoft Xbox Series X game console (this is the console I personally own; I assume other HDR-Enabled Xbox SKUs use this format as well, but cannot confirm). Screenshots taken in HDR-supported software are exported both as (non-HDR) PNG files, and as an equivalent JPEG XR file. If necessary/wanted, I can attach one such pair of files.

I know that ImageMagick supports the format, although the version provided in the Arch Linux package repositories does not have support compiled in. I have also found a plugin for GIMP 2.8.x that adds support, although it discards HDR data when loading the file, as GIMP apparently does not support it.
https://github.com/chausner/gimp-jxr
Comment 1 Albert Astals Cid 2022-03-16 22:52:10 UTC
Adding Daniel since he's been implementing support for "new formats" recently, in case he's interested
Comment 2 2wxsy58236r3 2022-03-20 02:16:20 UTC
There is also https://github.com/informationsea/Qt-JPEGXR but it has many limitations and is no longer actively developed.
Comment 3 caulier.gilles 2022-07-06 11:37:27 UTC
Hi,

I vote also to have this file format supported in KDE Qt image IO plugins collection.

Best

Gilles Caulier
Comment 4 Mirco Miranda 2024-05-01 16:35:10 UTC
I wrote a read-only implementation quickly, but I'm missing sample images to try.
Without a good set of images there is no point in going further. If you have any, attach them to this task.

The current state of the code for now is on my fork: https://invent.kde.org/mircomir/kimageformats/-/merge_requests/10/diffs
Comment 5 Bug Janitor Service 2024-05-03 10:43:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kimageformats/-/merge_requests/216
Comment 6 Bug Janitor Service 2024-05-19 07:29:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kimageformats/-/merge_requests/219
Comment 7 Albert Astals Cid 2024-06-07 10:44:14 UTC
Git commit b8a9c75c8088bdf9096df6c20f790dabaf60dd24 by Albert Astals Cid, on behalf of Mirco Miranda.
Committed on 07/06/2024 at 10:35.
Pushed by aacid into branch 'master'.

JXR support

An implementation of the JXR format.

M  +6    -1    CMakeLists.txt
M  +1    -0    README.md
M  +9    -0    autotests/CMakeLists.txt
A  +-    --    autotests/read/jxr/abydos_bgra32.jxr
A  +-    --    autotests/read/jxr/abydos_bgra32.png
A  +-    --    autotests/read/jxr/testcard_bgra8.jxr
A  +-    --    autotests/read/jxr/testcard_bgra8.png
A  +-    --    autotests/read/jxr/testcard_gray16.jxr
A  +-    --    autotests/read/jxr/testcard_gray16.png
A  +-    --    autotests/read/jxr/testcard_gray8.jxr
A  +-    --    autotests/read/jxr/testcard_gray8.png
A  +-    --    autotests/read/jxr/testcard_mono.jxr
A  +-    --    autotests/read/jxr/testcard_mono.png
A  +-    --    autotests/read/jxr/testcard_rgb16.jxr
A  +-    --    autotests/read/jxr/testcard_rgb16.png
A  +-    --    autotests/read/jxr/testcard_rgb8.jxr
A  +-    --    autotests/read/jxr/testcard_rgb8.png
A  +-    --    autotests/read/jxr/testcard_rgba16.jxr
A  +-    --    autotests/read/jxr/testcard_rgba16.png
A  +-    --    autotests/read/jxr/testcard_rgba8.jxr
A  +-    --    autotests/read/jxr/testcard_rgba8.png
A  +24   -0    cmake/find-modules/FindLibJXR.cmake
M  +14   -0    src/imageformats/CMakeLists.txt
A  +1141 -0    src/imageformats/jxr.cpp     [License: LGPL(v2.0+)]
A  +4    -0    src/imageformats/jxr.json
A  +47   -0    src/imageformats/jxr_p.h     [License: LGPL(v2.0+)]
M  +13   -0    src/imageformats/util_p.h

https://invent.kde.org/frameworks/kimageformats/-/commit/b8a9c75c8088bdf9096df6c20f790dabaf60dd24
Comment 8 Mirco Miranda 2024-09-30 05:41:14 UTC
The JXR format is now part of KF6 even if its compilation is disable by default.