JPEG XR libraries for Python
Pillow and OpenCV don’t support JPEG XR. The library that does:
- imagecodecs includes jxrlib in its binary wheels and decodes JPEG XR to NumPy arrays (uint8, uint16, float16 or float32, including HDR half float data) and encodes arrays to JPEG XR. It’s the easiest way to process Windows HDR screenshots in Python.
On Windows, you can also call the WIC codec through comtypes, but imagecodecs is simpler and works on every OS.
- imagecodecs imagecodecs reads and writes JPEG XR in Python with the bundled jxrlib. How to decode JXR files to NumPy arrays, convert HDR screenshots to PNG.