JPEG XL

Info

rules 57
github 35276
reddit 647

JPEG XL

tools 4225
website 1655
adoption 20712
image-compression-forum 0

General chat

welcome 3810
introduce-yourself 291
color 1414
photography 3435
other-codecs 23765
on-topic 24923
off-topic 22701

Voice Channels

General 2147

Archived

bot-spam 4380

Gainmap Handling in JXL

gb82
spider-mario is it not embedded as metadata? does `cjxl` drop it altogether?
2023-11-02 07:16:45
2023-11-02 07:16:46
IIRC it is stored as a second JPEG at 1/4 of the resolution
jonnyawsom3
2023-11-02 07:17:12
I was going to say, if it is literally a jpeg stored as metadata, then maybe JXL could transcode into a 2 layered JXL, still preserving the reversible operation. Although, then applying the map is still an issue, and it's a very specific case
gb82
2023-11-02 07:17:25
Yeah
spider-mario
2023-11-02 07:18:47
it seems the JPEG as reconstructed by `djxl` from the JXL file is (as hoped) identical to the original JPEG file
2023-11-02 07:18:56
so it seems it is essentially already doing the first part
gb82
2023-11-02 07:19:10
Yeah just tested that, that's awesome
spider-mario
2023-11-02 07:19:25
what remains to be done would be to actually use that when displaying such a JXL
gb82
2023-11-02 07:19:37
The question now is how to display the HDR. Is there no such thing as displaying an HDR JXL with some kind of SDR fallback?
spider-mario
2023-11-02 07:19:40
without having to write an intermediary JPEG
gb82
2023-11-02 07:20:59
Gainmap Handling in JXL
spider-mario
gb82 The question now is how to display the HDR. Is there no such thing as displaying an HDR JXL with some kind of SDR fallback?
2023-11-02 07:21:13
runtime tone mapping is an option (for example https://github.com/libjxl/libjxl/blob/main/tools/hdr/local_tone_map.cc but we are working on another approach), but at present, we have not specified any gainmap-like approach
2023-11-02 07:21:21
and Jyrki is kind of opposed to it
gb82
2023-11-02 07:21:28
That's fair
2023-11-02 07:22:11
I just wonder what the solution is if you're a person who took a bunch of HDR JPEGs no your Pixel, & you'd like to post them on the Web as JXL images but preserve the SDR-HDR fallback dichotomy
2023-11-02 07:22:34
And same with iPhone users taking HEIC images with that extra channel for HDR. I believe AVIF can handle this
2023-11-02 07:23:44
> and in the future AVIF gain maps should offset that change in size via https://gregbenzphotography.com/hdr-images/ under "What are the limitations of gain maps?"
_wb_
2024-01-26 10:36:20
Eric Chan does specify this: https://helpx.adobe.com/content/dam/help/en/camera-raw/using/gain-map/jcr_content/root/content/flex/items/position/position-par/table/row-io13dug-column-4a63daf/download_section/download-1/Gain_Map_1_0d14.pdf
2024-01-26 10:37:06
maybe we should have a meeting with Eric Chan to discuss this stuff...
gb82
2024-01-31 09:58:18
oh I would really like to
2024-01-31 10:00:00
if some of the gainmap discussion could lead to having a cli tool for converting gainmapped JPEGs into HDR PNGs, that would be very cool, because currently I don't know how to preserve the HDR when transcoding a gainmapped JPEG