(Visual C++ Redistributable required, which you likely already have installed)
This is a simple command line tool for converting HDR JPEG XR files, such as Windows HDR screenshots, to PNG.
The output format is 16 bit PNG with BT.2100 + PQ color space, but the actual data is quantized to 10 bits to try to keep the size reasonably low. The files should display properly in any Chromium-based browser, which includes Electron apps like the desktop version of Discord.
jxr_to_png input.jxr [output.png]
Instead of using the command line, you can also drag a .jxr file onto the executable.
The MaxCLL value is calculated as suggested in the paper On the Calculation and Usage of HDR Static Content Metadata, by taking the light level of the 99.99 percentile brightest pixel. This is an underestimate of the "real" MaxCLL value calculated according to H.274, so it technically causes some clipping when tone mapping. However, following the spec can lead to a much higher MaxCLL value, which causes e.g. Chromium's tone mapping to significantly dim the entire image, so this trade-off seems to be worth it.