JPEG XL

Info

rules 58
github 38692
reddit 688

JPEG XL

jxl-rs 0
tools 4270
website 1813
adoption 22069
image-compression-forum 0
glitch-art 1071

General chat

welcome 3957
introduce-yourself 294
color 1687
photography 3532
other-codecs 25116
on-topic 26652
off-topic 23987

Voice Channels

General 2578

Archived

bot-spam 4577

color

jonnyawsom3
2025-12-18 09:44:50
`cjxl -x color_space=XYB_Per -d 0 Olo-XYB.pfm Olo-XYB.jxl`
ignaloidas
2025-12-18 09:45:16
What will be displayed depends purely on how the clipping is done, no?
dogelition
`cjxl -x color_space=XYB_Per -d 0 Olo-XYB.pfm Olo-XYB.jxl`
2025-12-18 09:49:27
reminds me of ycbcr 0, 0, 0
ignaloidas
`cjxl -x color_space=XYB_Per -d 0 Olo-XYB.pfm Olo-XYB.jxl`
2025-12-18 09:56:48
I wonder, if you use XYB_Abs, do you get any different results?
jonnyawsom3
ignaloidas I wonder, if you use XYB_Abs, do you get any different results?
2025-12-18 09:59:36
`lib\jxl\fields.cc:426: JXL_ABORT: AllDefault should never fail`
2025-12-18 10:00:34
I did however realise that lossless effectively hands the color management to the viewer, using lossy makes it into a saturated green
ignaloidas
2025-12-18 10:02:39
huh, I don't see anything in the spec that would make absolute rendering intent not work with XYB, weird that there's a crash 😅
jonnyawsom3
2025-12-18 10:03:14
We had to apply this old PR too, otherwise it stays dark green https://github.com/libjxl/libjxl/pull/2506
ignaloidas
2025-12-18 10:08:57
Doesn't surprise me that trying to encode/display non-physical colors ends up in issues
jonnyawsom3
2025-12-18 10:12:43
*Theoretically*, without clipping, this file is Olo... Maybe. The B channel may need Y subtracted from it depending on what version of XYB libjxl was interpreting it as
ignaloidas
2025-12-18 10:16:34
hmm, I'm just getting the darker variant on viewers I have, except that GIMP completely refuses to decode it
novomesk
*Theoretically*, without clipping, this file is Olo... Maybe. The B channel may need Y subtracted from it depending on what version of XYB libjxl was interpreting it as
2025-12-18 11:23:58
dogelition
lonjil Can anyone recommend some kind of monitor color / brightness checker? Ideally that can give me useful information under Linux.
2025-12-23 09:10:16
if you haven't bought one yet: https://www.ebay.com/itm/227135976963 (unclear from that pic if it goes up to 2k or 1k nits, good price either way though)
lonjil
2025-12-23 09:11:16
Oh, that is a really good price, thanks!
2025-12-23 09:11:42
*checks wallet* seems I already spent way too much money tho 🥲
RaveSteel
2025-12-25 12:46:29
https://github.com/dylanraga/win11hdr-srgb-to-gamma2.2-icm
Quackdoc
RaveSteel https://github.com/dylanraga/win11hdr-srgb-to-gamma2.2-icm
2025-12-25 01:03:51
when you stumble into something that works, dunno why, and draw your own conclusion
dogelition
2025-12-25 04:01:15
alternatively, for sdr content only: https://github.com/ledoge/dwm_eotf
Quackdoc
dogelition alternatively, for sdr content only: https://github.com/ledoge/dwm_eotf
2025-12-26 01:22:24
this one is more neat IMO, i hate the word gamma so much lol
dogelition
Quackdoc this one is more neat IMO, i hate the word gamma so much lol
2025-12-26 01:33:21
it works great until chromium switches between outputting sdr and hdr every few seconds
2025-12-26 01:33:50
turns out there's a lot of stuff on the web and discord that's tagged as p3 or something
Quackdoc
2025-12-26 01:40:59
I really wish chromium was just always HDR when HDR mode was enabled
dogelition
2025-12-26 01:49:53
why?
2025-12-26 01:50:32
i'd guess they stay in 8 bit sdr for lower power consumption
Quackdoc
dogelition i'd guess they stay in 8 bit sdr for lower power consumption
2025-12-26 02:18:27
because sdr on hdr is buggy and looks not so great no matter what you do, also chromium iirc uses monitor bitdepth anyways
dogelition
Quackdoc because sdr on hdr is buggy and looks not so great no matter what you do, also chromium iirc uses monitor bitdepth anyways
2025-12-26 02:29:08
doesn't look like it https://source.chromium.org/chromium/chromium/src/+/main:ui/gfx/color_space_win.cc;drc=e8bd5419c4cfa034da3ded7c5016402c6f884fd8;l=350
2025-12-26 02:29:53
and there's nothing buggy about it afaik, it looks 100% identical between rendering in sdr and hdr
2025-12-26 02:30:46
the only real tell (other than actually seeing wide gamut/higher luminance colors) for hdr output is that if you change the windows sdr brightness slider, it only affects chromium when you focus it again
2025-12-26 02:31:20
because it fetches the value on focus, as opposed to sdr mode where windows is responsible for applying it and it changes it instantly
Quackdoc
dogelition and there's nothing buggy about it afaik, it looks 100% identical between rendering in sdr and hdr
2025-12-26 02:10:51
I've found that it can flounder pretty hard in some spots personally
dogelition
2025-12-26 02:14:48
🤔 that's probably a bug in chromium then
Crite Spranberry
2026-01-21 11:12:30
How does the Wide Gamut Webkit P3 display test work? I've never seen an instance where the webkit logo renders, even if I manually download and open the image in an external viewer
2026-01-21 11:13:12
My color picker also tells me that all images are completely 255,0,0 red
username
Crite Spranberry How does the Wide Gamut Webkit P3 display test work? I've never seen an instance where the webkit logo renders, even if I manually download and open the image in an external viewer
2026-01-21 11:16:52
your monitor needs to support wide gamut colors and you need a ICC profile setup in the OS to tell it that the monitor supports more colors then sRGB
spider-mario
Crite Spranberry My color picker also tells me that all images are completely 255,0,0 red
2026-01-21 01:02:53
picker from which software? you’d have to make sure the colour picker is not operating in sRGB or in display space
Crite Spranberry
2026-01-21 01:03:35
Well I was doing it from screenshot which I guess would be display space
2026-01-21 01:04:03
since I wanted to look at all four without downloading them and opening them seperately
2026-01-21 01:04:31
I guess it's because using like the cheapest 1440p 144hz monitor from 5 years ago with no special color profiles or shit
spider-mario
2026-01-21 01:05:37
it’s possible that it actually is wide-gamut, just unprofiled so the software side doesn’t know
Crite Spranberry
2026-01-21 01:06:07
96% sRGB
spider-mario
2026-01-21 01:06:08
even without a colorimeter, it could be interesting to see what kind of ICC profile DisplayCAL creates from the EDID
2026-01-21 01:06:20
ah, then maybe not
Crite Spranberry
2026-01-21 01:06:44
https://www.amazon.com/GNV27DB-2560x1440p-Curvature-G-Sync-Ready-Zero-Tolerance/dp/B084CYSSBG
spider-mario
2026-01-21 01:07:21
(I mean, even with a smaller volume, maybe the primaries have a slightly different hue or something, but, eh)
Crite Spranberry
2026-01-21 01:08:55
Like the one time I wanted to look into higher color depth shit (in this case it was a 10 bit panel like 7 or more years ago) I got ripped off, so like I don't particularly care about it anymore, other than wanting to confirm it's not like a bug or me going insane
username
Crite Spranberry Like the one time I wanted to look into higher color depth shit (in this case it was a 10 bit panel like 7 or more years ago) I got ripped off, so like I don't particularly care about it anymore, other than wanting to confirm it's not like a bug or me going insane
2026-01-21 01:24:30
if you ever plan on trying again in the future I'd recommend looking for a display that's certified VESA DisplayHDR™ because monitors with that have to actually adhere to minimum specifications set by VESA instead of the manufacturer eyeballing it and slapping "HDR" or whatever else on the product https://displayhdr.org/performance-criteria/
Crite Spranberry
2026-01-21 01:26:10
Yeah for me it was Acer claimed the monitor was 10 bit, but I bought it right when they did a cheaper refresh of it without 10 bit and didn't update the page and then because I was using [chlamydia](https://cdn.discordapp.com/emojis/1440694258679025856.webp?size=48&name=chlamydia&lossless=true) GPU I had no idea if my monitor was 10 bit or if the GPU was artificially restricting me from using 10 bit
Quackdoc
2026-01-23 04:03:41
are there any good introduction guides to gamut mapping with an emphasis on actual practical implementation? something oriented to beginner coders or something
Tirr
2026-01-23 04:05:54
~~I learned gamut mapping with libjxl~~
Quackdoc
2026-01-23 04:11:21
yeah, someone asked me about it, i kinda feel like looking at other code is just how people do it lmao
2026-01-23 05:03:29
https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/issues/41 bruhhhhhhh
RaveSteel
2026-01-23 05:57:10
That's unfortunate, if he is correct
Quackdoc
2026-01-23 06:12:08
right now im optionally clipping scrgb since I just want a cheap hack, but im wondering how *should* i map scrgb gamut?
2026-01-23 06:20:03
maybe it's better to scRGB -> XYZ -> XYB? <@206628065147748352> any idea if this would play well with jxl-oxide when requested gamma2.2 output? I honestly have zero idea but I think it would? the issue would be Y < 0.0 ?
Tirr
2026-01-23 06:21:45
I'd do tone mapping in XYZ or XYB, and gamut mapping in Oklch if it's feasible
2026-01-23 06:21:53
but I'm not an expert either
Quackdoc
2026-01-23 06:53:31
actually now that I think about it, is the matrix in https://cdn.standards.iteh.ai/samples/35876/24e0310d04e54233abf5d067e49a8eb7/IEC-61966-2-2-2003.pdf even applicable to microsoft's scRGB? I honestly don't know
2026-01-23 06:55:08
> The encoding transformations provide unambiguous methods to transform between CIE 1931 XYZ tristimulus values and 16-bit values for each channel of scRGB. The CIE 1931 XYZ values are scaled so that the sRGB black point to white point luminance is 0,0 to 1,0, not 0,0 to 100,0. Y-tristimulus values less than 0,0 in CIE 1931 XYZ space represent values below black. Y-tristimulus values greater than 1,0 represent values brighter than relative white. > > The scRGB components that range from 0 to 16 384 encompass all visible surface colours (from −0,5 to 1,5). The range from 12 288 to 65 535 is used to encode an extended specular range of colours (from larger than 1,0 to 7,4999).
2026-01-23 06:55:10
[Hmm](https://cdn.discordapp.com/emojis/1113499891314991275.webp?size=48&name=Hmm&lossless=true)
2026-01-23 06:56:10
ofc, we know that microsoft exceeds 7.5 regularly
dogelition
Quackdoc actually now that I think about it, is the matrix in https://cdn.standards.iteh.ai/samples/35876/24e0310d04e54233abf5d067e49a8eb7/IEC-61966-2-2-2003.pdf even applicable to microsoft's scRGB? I honestly don't know
2026-01-23 07:13:35
just calculate the linear srgb -> xyz matrix yourself from the srgb xy values
Quackdoc
2026-01-23 07:16:45
ah, sorry, I mean the prep to the matrix
2026-01-23 07:16:56
2026-01-23 07:17:14
I think it's simply not necessary to normalize
2026-01-23 07:17:40
I think I can just apply it and call it good
2026-01-23 07:17:43
*i think*
dogelition
2026-01-23 07:17:45
yes
Quackdoc
2026-01-23 07:18:54
ok, imma try that, just raw dog it directly to XYB, pump that to jxl, decode it with jxl-oxide and pray LMAO
2026-01-23 07:19:22
well later me will do that
2026-01-23 11:29:08
looks like xlibre HDR is actually being developed
RaveSteel
2026-01-23 11:49:42
I'll believe it when I see it
Quackdoc
RaveSteel I'll believe it when I see it
2026-01-23 11:51:43
https://github.com/orgs/X11Libre/discussions/251#discussioncomment-15585471
2026-01-23 11:51:47
heres the POC
Traneptora
2026-01-23 11:52:02
>X11 >HDR that's a thing?
2026-01-23 11:52:15
I was under the impression X would never be HDR
Quackdoc
2026-01-23 11:53:16
it has been for a long time, this is just the beginning of work of making it usable for desktops, but for those of us who needed HDR kiosks long before wayland was usable, a simple mod can make xorg output PQ or hlg
2026-01-23 11:53:55
but realistically speaking 99% of the issues with x11 are specifically because of xorg, not because of x11 itself
RaveSteel
2026-01-23 11:55:58
You wrote "HDR doesn't work great on KDE because KDE messed up the SDR on HDR", could you give some more context regarding this? I found SDR to be fine, personally, but also haven't had much exposure to HDR in general
Quackdoc
2026-01-23 11:59:05
SDR apps on KDR all look off in really weird ways, it's not too noticable when you are just doing normal use, but it's really hard to tune right, when you change SDR application brightness on KDE, it influences HDR application's brightness, and SDR RGB channels don't seem to be properly synced when changing luminance which makes it feel really awkward
RaveSteel
2026-01-24 12:01:58
Hm, interesting. Have you considered opening a ticket at the kde bugtracker? If you provide me with more info I could also do it. Regarding SDR in HDR I found that colors are slightly oversaturated in HDR, but it wasn't a massive difference, luckily
Quackdoc
2026-01-24 12:30:53
some of the issues have already been raised, ill see if I can find the links to them
Dunda
Quackdoc are there any good introduction guides to gamut mapping with an emphasis on actual practical implementation? something oriented to beginner coders or something
2026-01-24 05:04:25
I don't know how good of a generic guide it is, but this article covers a few approaches to clip mapping to a smaller gamut https://bottosson.github.io/posts/gamutclipping/
spider-mario
2026-01-24 05:45:02
could be fun to look at how libjxl’s _ad hoc_ method behaves on that test image
awxkee
2026-01-26 12:05:27
HDR itself doesn't mean gamut mapping is required, you can increase luminance in sRGB just fine, many displays and hardware drivers allows that. It requires luminance mapping or tone mapping
2026-01-26 12:06:08
Gamut mapping is required when WideGamut is involved ( Rec.2020, ACES etc) and one want to compress bigger gamut into a smaller one
2026-01-26 12:07:30
Usually one can't do that in Oklab since is described by sRGB so it's not directly possible to use this colorspace neither for HDR nor for WideGamut
2026-01-26 12:09:32
And as HDR requires manipulation on physical lightness directly so one should compress lightness in linear colorspace or more tecnhically in scene-linear light
2026-01-26 12:10:42
and after that if gamut compression is required then perform gamut boundaries clipping in one of huge uniform perceptual colorspaces
2026-01-26 12:13:18
The only real problem here is that anyways this is a concept "how to put something big into a something small" so there are no ways to do without breaking something.
Quackdoc are there any good introduction guides to gamut mapping with an emphasis on actual practical implementation? something oriented to beginner coders or something
2026-01-26 12:40:14
Gamut mapping is mostly ignored since display will clip colors anyways. Most of commercial photographic software uses some sort of crude clipping like [this](https://github.com/awxkee/moxcms/blob/5a7db55b988155dc041f329a286c0f80b4289bc6/src/gamut.rs#L45) . If you want to do some sort of "real gamut clipping" [here](https://eng.aurelienpierre.com/2022/02/color-saturation-control-for-the-21th-century/#fitting-hue) is a good article how that works with an example.
Quackdoc
2026-01-26 01:02:09
I will look into these thanks
spider-mario
awxkee HDR itself doesn't mean gamut mapping is required, you can increase luminance in sRGB just fine, many displays and hardware drivers allows that. It requires luminance mapping or tone mapping
2026-01-26 07:44:28
some tone mapping methods produce out-of-gamut colours even if everything started in-gamut, so then you do need a pass of gamut mapping afterwards
awxkee
2026-01-26 08:55:50
Yep, but many tone mappers suffer from over compression, especially when applied directly in the RGB color model. Producing out-of-gamut colors from already in-gamut colors usually requires exotic tone mapping that I assume someone starting exploring tone mapping will unlikely to encounter, or applying tone mapping in a different scene-linear color space for example Yrg.
_wb_
2026-01-26 09:58:33
When going from PQ with sRGB primaries to SDR sRGB, you get out of gamut if you try to preserve saturation, right?
spider-mario
awxkee Yep, but many tone mappers suffer from over compression, especially when applied directly in the RGB color model. Producing out-of-gamut colors from already in-gamut colors usually requires exotic tone mapping that I assume someone starting exploring tone mapping will unlikely to encounter, or applying tone mapping in a different scene-linear color space for example Yrg.
2026-01-26 10:01:44
it doesn’t require exotic tone mapping; the simple EETF described in BT.2408 (https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BT.2408-8-2024-PDF-E.pdf#page=68 page 66) will do so in several configurations
awxkee
spider-mario it doesn’t require exotic tone mapping; the simple EETF described in BT.2408 (https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BT.2408-8-2024-PDF-E.pdf#page=68 page 66) will do so in several configurations
2026-01-26 10:19:31
This is exactly what I mean exotic as you don't start exploring something by reading ITU-R recommendations 🙂
_wb_ When going from PQ with sRGB primaries to SDR sRGB, you get out of gamut if you try to preserve saturation, right?
2026-01-26 10:29:45
Depends on working color space, color model and tone mapper. If orthogonal linear colorspace i.e. Yrg is used then yes, highlights almost definetely will be out-of-gamut. If linear RGB is used it depends on tone mapper for ex. Reinhard almost never will produce something out-of-gamut, but some log based tone mappers almost always will.
spider-mario
awxkee This is exactly what I mean exotic as you don't start exploring something by reading ITU-R recommendations 🙂
2026-01-26 10:30:35
well, I did
_wb_
2026-01-26 10:36:04
starting with the ITU recommendations seems a sensible thing to do to me, those are standards and they're publicly available
awxkee
2026-01-26 11:13:31
I agree as default Rec.2408 is nice choice
2026-01-26 11:14:34
but many people will start with typing to search "tone mapping" and there will be no links to ITU
2026-01-26 11:20:52
speaking of 2408 AFAIK it doesn't produce or "almost no produce" out-of-gamut colors when performed in linear RGB and chosen lightness is a correct one and you're not compressing gamut by the way
2026-01-26 11:21:11
it should be specified in pdf if I'm not wrong
2026-01-26 11:26:32
Yep, it is
Quackdoc
awxkee HDR itself doesn't mean gamut mapping is required, you can increase luminance in sRGB just fine, many displays and hardware drivers allows that. It requires luminance mapping or tone mapping
2026-01-26 05:07:13
> HDR itself doesn't mean gamut mapping is required, you can increase luminance in sRGB just fine, many displays and hardware drivers allows that. It requires luminance mapping or tone mapping it's worth noting that not everyone agrees that HDR is simply luminance, many people believe that "HDR" also encompasses a wider gamut
awxkee Gamut mapping is required when WideGamut is involved ( Rec.2020, ACES etc) and one want to compress bigger gamut into a smaller one
2026-01-26 05:11:01
rn im just wondering on how best to implement gamut conversion from scRGB to sRGB
_wb_
2026-01-26 05:18:21
one thing I don't really get is this: if you have a color like (4.0, 0.0, 0.0), where sRGB white is (1.0, 1.0, 1.0), then is this "super red" inside the sRGB color gamut or not? If you'd render sRGB on a display 4x as bright, this color would just be (1.0, 0.0, 0.0), so the color is inside the sRGB gamut, but then again the value is out of range so you can also think about it as a color that is within the normal brightness range of sRGB — after all it should still have an overall luminance that is a bit lower than (1.0, 1.0, 1.0) — but just much more saturated.
Quackdoc
2026-01-26 05:21:38
I hate how confusing color is <:SadCheems:890866831047417898>
dogelition
2026-01-26 05:31:54
depends on how you define your sRGB color space. if you go by the textbook definition of 80 nits then it's out of gamut, but if you set the white point at 4*80 = 320 nits (still reasonable) then it's barely within gamut assuming (4,0,0) is supposed to be a triple in microsoft's scrgb space specifically
2026-01-26 05:33:37
i think luminance is a red herring here, it makes more sense to think about this in terms of CLL ("content light level" iirc). basically if you take (4,0,0) you say that it has a light level of 320 nits
2026-01-26 05:35:06
one of the h. standards explains this, one sec
awxkee
2026-01-26 05:35:39
I think it's hard to think about this in RGB color model. It may be easier to think in some luminance orthogonal colorspace Yrg, JzAzBz where luminance projection doesn't shift hue. In such spaces, increasing HDR luminance leaves hue unchanged, so the color simply becomes "brighter" rather than different. From this perspective, a color like (4.0, 0.0, 0.0) lies outside the sRGB gamut only in terms of its encoded range, not its chromaticity. If you clamp or project the extended luminance back into the SDR range, the color immediately becomes an in-gamut sRGB color with the same hue and chromaticity. In that sense, it can be thought of as an imaginary extension along the luminance axis rather than a truly out-of-gamut color.
dogelition
2026-01-26 05:36:59
it's kinda hard to put in words but the idea is pretty simple (this is from h.265)
awxkee
2026-01-26 05:37:06
This is my understanding. I don’t claim that it’s absolutely true.
Quackdoc
2026-01-26 05:39:27
this is why I always change to something like XYZ lol
dogelition
2026-01-26 05:41:38
also, regarding mapping from scRGB to sRGB: i think for the result to be sensible you first have to detect the actual gamut spanned by the input, since it's effectively unbounded
2026-01-26 05:42:11
an scRGB screenshot can just be the windows desktop without any wide gamut or >80 nits pixels present
2026-01-26 05:43:15
(though if it's the windows desktop set to a higher brightness, then presumably you'd just want to scale down the luminance linearly and not touch the chromaticity)
2026-01-26 05:51:59
https://github.com/bvibber/hdrfix
2026-01-26 05:52:04
maybe this does something reasonable, idk
Quackdoc
2026-01-26 06:46:30
yeah, I do I think I want to optimize for XYB so jxl can "just werk" with it
spider-mario
awxkee speaking of 2408 AFAIK it doesn't produce or "almost no produce" out-of-gamut colors when performed in linear RGB and chosen lightness is a correct one and you're not compressing gamut by the way
2026-01-26 07:44:45
to clarify, non-linear is not the problem (YRGB is the linear one; R′G′B′ isn’t); doing it on channels independently vs. “all at once” is
2026-01-26 07:49:16
YRGB: compute ratio = target luminance / source luminance linear R \*= ratio linear G \*= ratio linear B \*= ratio can generate out-of-gamut colours if the ratio is not small enough to bring one of the components below 1 (for example, pure blue above 1 which is still not very bright – because it’s blue – so it’s not reduced a lot, if at all, by the ratio) R′G′B′: R in PQ = EETF(R in PQ) G in PQ = EETF(G in PQ) B in PQ = EETF(B in PQ) since the EETF maps the source PQ range to the target PQ range by construction, the end values are naturally limited to the right range with no further adjustment (but because this might amount to different linear ratios per channel, it might shift hue)
ignaloidas
2026-01-26 08:30:57
What kind of stuff you want to do depends on the wanted rendering intent as well, on absolute/saturation you just clip in some way, while with perceptual or relative you end up trying to map it somehow
2026-01-26 08:31:13
(not that deciding on the rendering intent is easy either)
awxkee
Quackdoc yeah, I do I think I want to optimize for XYB so jxl can "just werk" with it
2026-01-27 01:38:52
There is also a tone mapping tool here: https://github.com/awxkee/gainforge. It's a bit messy and some of the naming is outdated, but in practice it can successfully perform tone mapping with a bit of effort for everything give or take. I personally haven't worked with scRGB but don't expect much difference to any other HDR colorspaces
Quackdoc
awxkee There is also a tone mapping tool here: https://github.com/awxkee/gainforge. It's a bit messy and some of the naming is outdated, but in practice it can successfully perform tone mapping with a bit of effort for everything give or take. I personally haven't worked with scRGB but don't expect much difference to any other HDR colorspaces
2026-01-27 03:04:19
the big thing for me is to utilize as much of JXLs capabilities as possible such as encoding a higher quality image like an HDR wide gamut image, so if you need an SDR one, you can just request that in the client.
awxkee
2026-01-27 03:59:56
When I first implemented libjxl it was dreadfully slow so I had to come up with workarounds for almost everything. Many things have changed since then, but libjxl tone mapping during end-to-end decoding still causes roughly a 2x slowdown compared to my previous workaround, so I still prefer avoid this
Quackdoc
2026-01-27 09:32:38
interesting, for me it's a fairly major feature since "one and done" images are the way to an HDR first future
awxkee
2026-01-27 10:30:30
I think it would be nice for OS to go the same way iOS did, where you can simply tag an image as PQ P3 or PQ BT.2100 and don't worry about tone mapping at all, since the OS/driver handles it, and doing so is very easy. They've supported this since iOS 13, so it has worked "right" for a long time. On the other hand, I have experience with Android and it's a nightmare. While it technically supports tagging PQ BT.2020 on RGBA8888 ( interesting why 8-bit HDR is strictly supported? ), but it randomly panics if you try to tag RGBA1010102 or RGBAF16 as an HDR image. So it's just easier tonemap just completely everything on android than messing with this ( at least it was the state when I was actively developing this ). Considering that libjxl isn't very fast and many Android devices aren’t very fast either, it’s also preferable to take the fastest possible approach.
Quackdoc
awxkee I think it would be nice for OS to go the same way iOS did, where you can simply tag an image as PQ P3 or PQ BT.2100 and don't worry about tone mapping at all, since the OS/driver handles it, and doing so is very easy. They've supported this since iOS 13, so it has worked "right" for a long time. On the other hand, I have experience with Android and it's a nightmare. While it technically supports tagging PQ BT.2020 on RGBA8888 ( interesting why 8-bit HDR is strictly supported? ), but it randomly panics if you try to tag RGBA1010102 or RGBAF16 as an HDR image. So it's just easier tonemap just completely everything on android than messing with this ( at least it was the state when I was actively developing this ). Considering that libjxl isn't very fast and many Android devices aren’t very fast either, it’s also preferable to take the fastest possible approach.
2026-01-27 10:37:44
interesting experience, I have found that neither android nor IOS particularly handle mixing great, but found that android did better. I suppose surfaceflinger might be a bit panicky depending on the rom and hardware it's on top of [hmmmm](https://cdn.discordapp.com/emojis/790799062735257612.webp?size=48&animated=true&name=hmmmm&lossless=true)
awxkee
2026-01-27 11:09:21
I think to me iOS approach "Press F to win" even this "win" is not completely ideal a way better than "we could do something perfect, but you won't guess how to use this". Ofc those panics which was "This is not possible to enhance an image" ( whatever that means )
2026-01-27 11:10:00
Well I wanted to say this it was completely undocumented behavior that time but now it is https://developer.android.com/reference/android/graphics/Bitmap#setColorSpace(android.graphics.ColorSpace)
2026-01-27 11:10:34
Except that this still doesn't explain why it was supporting 8-bit PQ but not packed 10-bit or f16
Dunda
_wb_ one thing I don't really get is this: if you have a color like (4.0, 0.0, 0.0), where sRGB white is (1.0, 1.0, 1.0), then is this "super red" inside the sRGB color gamut or not? If you'd render sRGB on a display 4x as bright, this color would just be (1.0, 0.0, 0.0), so the color is inside the sRGB gamut, but then again the value is out of range so you can also think about it as a color that is within the normal brightness range of sRGB — after all it should still have an overall luminance that is a bit lower than (1.0, 1.0, 1.0) — but just much more saturated.
2026-01-28 03:24:24
If you think of it as xyY, rgb(4,0,0) has the same chromaticity as rgb(1,0,0). So it will stay the same red (no more saturated), but be much brighter
2026-01-28 03:30:08
Looking at an OkLch picker, it seems to also mosty agree that multiplying each linear channel by the same amount keeps the same hue, but not luma or chroma
spider-mario
2026-01-28 05:41:00
gamut includes luminance to at least some extent
2026-01-28 05:41:16
Adobe RGB is capable of reds that sRGB isn’t, despite their red primaries having the same chromaticity
Dunda
2026-01-29 12:27:18
I can't see anything about Adobe RGB HDR from it's wikipedia description, though at least it's white point luminance is set to double that of sRGB
2026-01-29 12:28:21
Perhaps the reds look redder in contrast to the expanded cyan and green range, but by itself I can't imagine the red looks any more saturated
spider-mario
2026-01-29 07:25:08
I meant brighter even in relative terms (both of them with the same white point)
2026-01-29 07:25:34
if you want bright red, Adobe RGB lets it be more saturated
2026-01-29 07:34:05
in normalised XYZ (white has Y=1), Adobe RGB red is (0.57667, 0.29734, 0.02703), whereas sRGB red is (0.4124, 0.2126, 0.0193)
2026-01-29 12:13:04
(and here is a verification that those indeed have the same chromaticity) ``` Welcome to Rakudo™ v2024.09. Implementing the Raku® Programming Language v6.d. Built on MoarVM version 2024.09. To exit type 'exit' or '^D' [0] > sub chromaticity(@XYZ) {@XYZ[^2] «/» [+] @XYZ} &chromaticity [1] > chromaticity [0.57667, 0.29734, 0.02703] (0.640005 0.329996) [2] > chromaticity [0.4124, 0.2126, 0.0193] (0.640074 0.329971) [3] > ```
Quackdoc
2026-01-29 01:38:05
Woah what is that tool?
spider-mario
2026-01-29 01:55:42
Raku is what used to be Perl 6, and Rakudo is its main implementation
2026-01-29 01:55:46
this is its REPL
2026-01-29 01:56:52
this session defines a `chromaticity` function that takes an array `@XYZ` of coordinates and returns the first two values (`@XYZ[^2]`, so X and Y) each divided by the total (`[+] @XYZ`)
2026-01-29 02:02:50
the matlab/octave equivalent would be: ```matlab octave:1> function chromaticity(xyz) chromaticity = xyz(1:2) / sum(xyz) endfunction octave:2> chromaticity([0.57667, 0.29734, 0.02703]) chromaticity = 0.6400 0.3300 octave:3> chromaticity([0.4124, 0.2126, 0.0193]) chromaticity = 0.6401 0.3300 ```
2026-01-29 02:04:12
python (one option): ```pycon >>> def chromaticity(xyz): return tuple(x / sum(xyz) for x in xyz[:2]) ... >>> chromaticity([0.57667, 0.29734, 0.02703]) (0.6400048832460268, 0.3299964485483441) >>> chromaticity([0.4124, 0.2126, 0.0193]) (0.6400744994567747, 0.32997051063169336) ```
Quackdoc
2026-01-29 02:36:21
man, I've been meaning to learn perl for a long time now, now I have a good reason
Dunda
spider-mario in normalised XYZ (white has Y=1), Adobe RGB red is (0.57667, 0.29734, 0.02703), whereas sRGB red is (0.4124, 0.2126, 0.0193)
2026-01-29 03:07:22
I see it now, it must be brighter to offset the green basis that is further away from the white point. Though still, the same chromaticity is the same red saturation
spider-mario
2026-01-29 03:18:04
if you're fine with a relative luminance below 21.26%, sure; between 21.26% and 29.73%, sRGB will need to sacrifice saturation whereas Adobe RGB won't
2026-01-29 03:18:37
so it’s capable of more [colourful](https://en.wikipedia.org/wiki/Colorfulness) reds / reds with higher chroma
Quackdoc man, I've been meaning to learn perl for a long time now, now I have a good reason
2026-01-29 03:24:38
it can be worth noting that Perl 5 and Raku, while sharing some of their “spirit”, are quite different languages (Raku is arguably the more “beautiful” language, but its implementation and libraries are not as mature; meanwhile, Perl 5 has a wide, established ecosystem and is probably the more practical option but it definitely has its quirks)
Dunda
2026-01-29 03:24:41
That makes sense
2026-01-29 03:25:46
So it's not inherently more colourful, but can hold onto saturation for longer
2026-01-29 03:31:08
While they could find a match with unbounded brightness, if I understand you correctly when bound by the proportions of the white point (nearly always) sRGB red is dimmer than Adobe RGB red, and to match brightness it must sacrifice saturation
spider-mario
Dunda So it's not inherently more colourful, but can hold onto saturation for longer
2026-01-29 03:31:46
almost: colourfulness is distinct from saturation, and same (non-zero) saturation with higher brightness => higher colourfulness
Dunda
2026-01-29 03:36:23
I guess in proper terms, their matches have the same colourfulness until sRGB hits its limit, past which sRGB sacrifices saturation which also degrades colourfulness
spider-mario
2026-01-29 03:45:47
unless I messed up somewhere, here is the chromaticity of sRGB / Adobe RGB red at full saturation (right), and the chromaticity of the red that sRGB must fall back to if it wants to match the max brightness of Adobe RGB red
2026-01-29 03:46:32
(it is entirely possible that I did mess up)
2026-01-29 03:48:35
(first: find the relative amounts of sRGB red / white to match the target luminance, then plot that mixture alongside the unmixed red)
Dunda
2026-01-29 03:49:04
A fairly significant sacrifice
spider-mario
2026-01-29 03:58:06
ah, the diagram exaggerates the difference a little because the apparent location of “white” seems to be D50 instead of D65
2026-01-29 03:58:22
here is D65
2026-01-29 03:59:52
one can also look in 3D
AccessViolation_
2026-02-15 09:43:44
are you using Wolfram Language for all of these?
2026-02-15 09:44:32
I've read about it, it's fascinating. It's a shame I can't just download it and try it
spider-mario
AccessViolation_ are you using Wolfram Language for all of these?
2026-02-15 09:52:26
yep; the 3D plot is the output of: ```wl ChromaticityPlot3D[{"sRGB", "AdobeRGB"}] ```
AccessViolation_
2026-02-15 09:57:49
aw, these don't work in Wolfram Alpha
jonnyawsom3
2026-02-16 09:15:08
Do we have an ICC profile for XYB laying around anywhere? I was thinking of using it to examine individual channel quality in Krita, just for more testing of the B quant table stuff
TheBigBadBoy - 𝙸𝚛
Do we have an ICC profile for XYB laying around anywhere? I was thinking of using it to examine individual channel quality in Krita, just for more testing of the B quant table stuff
2026-02-16 11:30:42
simply `cjpegli --xyb` then `exiftool -icc_profile -b -w xyb.icc in.jpg`
jonnyawsom3
2026-02-17 12:45:34
That's only for decoding IIRC
spider-mario
2026-02-17 08:55:03
we haven’t made a profile going the other direction
TheBigBadBoy - 𝙸𝚛
2026-02-17 09:41:01
wait, wdym other direction ?
2026-02-17 09:42:30
the above ICC "translates" XYB to sRGB (?), pixel data stored as XYB you want ICC for sRGB → XYB, pixel data stored as sRGB ?
2026-02-17 09:43:16
like applying these 2 ICCs back-to-back should not change anything to the pixel colors I guess
Kleis Auke
2026-02-17 10:45:34
Context: https://discord.com/channels/794206087879852103/794206170445119489/1374705416927187054
awxkee
2026-02-17 06:06:38
You can encode test profile like so https://github.com/awxkee/moxcms/blob/xyb/app/src/xyb.rs this is a bit bruteforce but it's fine for testing purposes. I have no idea about exact XYB bounds or even if used conversion is even correct one. However, as a quick sketch of "how to build a LUT profile fast" it shouldn’t be too far.
spider-mario
2026-03-15 11:31:42
https://www.dpreview.com/forums/threads/does-anybody-know-where-to-find-the-new-apple-cmfs.4831731/ > Apples has announced a new XDR display. They have also announced that they intend to standardize a new set of color matching functions with the CIE. <:garfieldsurprised:823250154319773727> have they?
awxkee
2026-03-16 12:03:58
Yeah, I don't think the standard is published, though they certainly have a plan
2026-03-16 12:04:01
https://www.apple.com/studio-display-xdr/pdf/Studio_Display_XDR_Technology_Overview_White_Paper.pdf
2026-03-16 12:04:19
2026-03-16 12:04:26
https://support.apple.com/en-us/105101
Quackdoc
spider-mario https://www.dpreview.com/forums/threads/does-anybody-know-where-to-find-the-new-apple-cmfs.4831731/ > Apples has announced a new XDR display. They have also announced that they intend to standardize a new set of color matching functions with the CIE. <:garfieldsurprised:823250154319773727> have they?
2026-03-18 01:18:45
I'm not gonna lie, I still don't understand what XDR actually is on a technical level. Someone explained it to me as a traditional transfer function with 12-bit bit depth, but as far as I can tell that's not right?
awxkee
2026-03-18 10:48:24
I think they did some tuning to avoid melting customers eyes looking on that display relatively bright display for a long time, though everything else is pure marketing