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

jxl

Anything JPEG XL related

DZgas Ж
Though, I have been contemplating moving the threshold to distance 15 instead, since at 10 it's best for photographic images but non-photographic struggles still
2025-03-19 02:20:50
I only see a real advantage of resampling around d20-22+ (pic). But not at all on d10+. I disagree with that.
https://discord.com/channels/794206087879852103/804324493420920833/1348640701361160286
2025-03-19 02:22:46
From the messages nearby I didn't understand what quality was used there
jonnyawsom3
2025-03-19 02:23:31
That was distance 10 with current and my tweak with different scaling
2025-03-19 02:23:47
The basis was this old discussion around beating AVIF https://discord.com/channels/794206087879852103/794206170445119489/1305592634462437396
2025-03-19 02:25:28
I wanted to check the distance they used, and enable resampling then. At first I thought distance 15, but that render was at distance 14 so I moved the threshold down to distance 10 to try and cover it
2025-03-19 02:26:18
Ideally photos could use resampling at distance 10, and non-photo at distance 20, since that's when it's better for both
DZgas Ж
2025-03-19 02:34:44
It's been 3 years since I first reported the "color fading issue" here, and the bug is still here https://discord.com/channels/794206087879852103/794206087879852106/1038517128610992159 https://discord.com/channels/794206087879852103/804324493420920833/1050034155464970322
jonnyawsom3
2025-03-19 02:39:45
Yeah, still an issue https://discord.com/channels/794206087879852103/794206170445119489/1351548537980321852
A homosapien
2025-03-19 02:45:36
I have a feeling it might be due to the aggressive quantization on the blue channel
2025-03-19 02:46:01
Perhaps it's overtuned?
2025-03-19 02:47:02
https://github.com/libjxl/libjxl/issues/3616
DZgas Ж
A homosapien I have a feeling it might be due to the aggressive quantization on the blue channel
2025-03-19 02:53:04
This is exactly what <@532010383041363969> is doing since I have already reported to him many times about problematic pictures, I have hundreds of them https://discord.com/channels/794206087879852103/794206170445119489/1209542475258269766 https://discord.com/channels/794206087879852103/794206170445119489/1209821088272490517 https://discord.com/channels/794206087879852103/794206170445119489/1209539745450033282 https://discord.com/channels/794206087879852103/794206170445119489/1209537689632641074 https://discord.com/channels/794206087879852103/794206170445119489/1107310666597007451 https://discord.com/channels/794206087879852103/794206170445119489/1107304236942884894 https://discord.com/channels/794206087879852103/804324493420920833/1084402230544838736 But I have a feeling that this is somehow connected with the fact that artifacts inside one VarDCT block are literally transferred to all nearby blocks, which in my opinion contradicts logic. But it happens and I have proven it many times. https://discord.com/channels/794206087879852103/794206170445119489/1074355637221347418 https://discord.com/channels/794206087879852103/794206170445119489/1074362924484788306 https://discord.com/channels/794206087879852103/794206170445119489/1074359203763855390 https://discord.com/channels/794206087879852103/848189884614705192/1069924982571933756 https://discord.com/channels/794206087879852103/794206170445119489/1074364288921260134 **None of these problems exist with -e 3 where the block is fixed 8x8**
A homosapien
2025-03-19 03:00:08
It's funny because jyrki Said he did a lot of changes around 0.8 and 0.9 that fixes that issue
2025-03-19 03:00:26
But all it did was cause an image quality regression 😅
DZgas Ж
The basis was this old discussion around beating AVIF https://discord.com/channels/794206087879852103/794206170445119489/1305592634462437396
2025-03-19 03:01:01
Only in photos, maybe. But otherwise, no, I would even say that even WEBP q0 would be better than resampling on -d 20
jonnyawsom3
2025-03-19 03:01:01
It was overtuning to your difficult images that caused the quality regressions since 0.8
DZgas Ж
A homosapien It's funny because jyrki Said he did a lot of changes around 0.8 and 0.9 that fixes that issue
2025-03-19 03:01:54
They actually fixed it... and then I came and showed that now this problem arose where it had not existed before...
A homosapien
2025-03-19 03:02:31
Show me proof that it actually was fixed
2025-03-19 03:02:37
I see the color issue in basically every version
DZgas Ж
2025-03-19 03:03:01
I don't believe that you can seriously say out loud: well hmmmm, on -d 20 jpeg xl is better than avif <:kekw:808717074305122316>
2025-03-19 03:05:21
https://cdn.discordapp.com/attachments/794206170445119489/1210507187320000553/jxl_animation.gif?ex=67dbd52b&is=67da83ab&hm=87c8c4bf15274d4bcd5c8ff72ea800f294f5ddfa36b9cbfc48748078419bd108&
A homosapien Show me proof that it actually was fixed
2025-03-19 03:05:48
it has been partially corrected for dark and red colors
A homosapien
2025-03-19 03:08:02
Can you show me examples?
DZgas Ж
A homosapien Can you show me examples?
2025-03-19 03:08:19
2025-03-19 03:10:05
<@207980494892040194>you can use my https://cdn.discordapp.com/attachments/794206170445119489/1209510866115100722/merged_image_color_sort.png?ex=67dc29c6&is=67dad846&hm=c88b274ade4fc336686eb9ce46b91a832ca0db63e6494b029e7e532d0d807d7f& data set and do color channel inversion, contrast -100 and overlay by difference on different versions of jpeg xl
Meow
DZgas Ж good. 548 megapixels can be encoded and opened without any problems having 8 gigabytes of RAM in total
2025-03-19 03:11:54
That's only 548,352,000 pixels each
DZgas Ж
A homosapien Can you show me examples?
2025-03-19 03:14:13
moreover - I found this error in other codecs too. in my personal fork of SVT-av1 to fix color problems I do 32 iterations of CfL instead of 1. getting excellent colors, better than in any original AV1 encoder that exists. But for other codecs like HEVC or AVC there is a quality offset setting for the color channel. WEBP has the so-called "sharp YUV" which actually just increases the quality for the color channel. And jpeg xl... has nothing. I can't set the quality for each XYB channel!
Meow That's only 548,352,000 pixels each
2025-03-19 03:15:15
Damn, really, for some reason I took the number of iterations and not pixels, and I did 6 iterations per pixel, my mistake
2025-03-19 03:15:42
https://discord.com/channels/794206087879852103/806898911091753051/1351905948901441587
It was overtuning to your difficult images that caused the quality regressions since 0.8
2025-03-19 03:20:17
For modular, of course, all this looks infinitely funny
jonnyawsom3
2025-03-19 03:21:29
Not modular, VarDCT https://discord.com/channels/794206087879852103/794206170445119489/1345199325172731905
DZgas Ж
Not modular, VarDCT https://discord.com/channels/794206087879852103/794206170445119489/1345199325172731905
2025-03-19 03:23:26
I hope I'll see it done someday
2025-03-19 03:23:41
3 years have passed...
2025-03-19 03:27:05
I am more confused by the fact that no one wants to switch from webp anywhere, at all, even Google, the same Google that first introduced Avif into Google search and YouTube, they completely stopped supporting AVIF in YouTube, it is no longer there, now only WEBP and Jpeg...
jonnyawsom3
DZgas Ж Only in photos, maybe. But otherwise, no, I would even say that even WEBP q0 would be better than resampling on -d 20
2025-03-19 03:36:33
Is that the full image or a crop?
DZgas Ж
2025-03-19 03:37:14
Just make jpeg xl decoded 100 times faster. come on <:Stonks:806137886726553651>
Is that the full image or a crop?
2025-03-19 03:37:19
crop
2025-03-19 03:38:26
I've been trying to encode this picture to jpeg xl for an hour now, although I've already checked that it looks much better in AVIF, and not much worse in WEBP
2025-03-19 03:46:39
-d 8.5 --gaborish=0 --epf=0 --resampling=1 -e 6
couleur
DZgas Ж <@207980494892040194>you can use my https://cdn.discordapp.com/attachments/794206170445119489/1209510866115100722/merged_image_color_sort.png?ex=67dc29c6&is=67dad846&hm=c88b274ade4fc336686eb9ce46b91a832ca0db63e6494b029e7e532d0d807d7f& data set and do color channel inversion, contrast -100 and overlay by difference on different versions of jpeg xl
2025-03-19 03:49:26
is there tools for making pixel art from album covers?
DZgas Ж
couleur is there tools for making pixel art from album covers?
2025-03-19 03:52:32
I don't know... I've been doing similar things for 3 years now through neural networks (chatgpt and others), just asking them to write code in python using Pillow. It's a microscopic matter, the main thing is to understand what and how you need. https://discord.com/channels/794206087879852103/794206170445119489/1209485581881450517
DZgas Ж -d 8.5 --gaborish=0 --epf=0 --resampling=1 -e 6
2025-03-19 04:12:32
<@238552565619359744>Including because of "sharp-yuv" webp looks even better in places than jpeg xl. Although this comparison is at the limit of webp q 1
2025-03-19 04:24:49
Original cjxl 0.11.1 -d 16 -e 3 cjxl 0.7.0 -d 16 -e 3
2025-03-19 04:25:50
color just die
jonnyawsom3
2025-03-19 04:29:09
It's strange, because I would've assumed quantization would mean less total colors, not less *of* the color
DZgas Ж
It's strange, because I would've assumed quantization would mean less total colors, not less *of* the color
2025-03-19 04:30:56
this is a macro effect, because of the tiny fading of colors on the border of each block, everything is very bad
It's strange, because I would've assumed quantization would mean less total colors, not less *of* the color
2025-03-19 04:35:51
AVIF has a similar problem (pic) but it's not nearly as strong... **webp** doesn't have this problem at all, even on q0
jonnyawsom3
2025-03-19 04:36:55
I'm surprised considering WebP's forced 4:2:0
2025-03-19 04:37:08
And limited TV range
DZgas Ж
2025-03-19 04:38:23
original | webp q 1
2025-03-19 04:38:59
yes. the difference is about zero. if you compare it like that, then jpeg xl is extremely bad, and has had this problem for many, many years
Demiurge
Orum well JXL's grain synthesis is pretty awful
2025-03-19 04:57:13
What makes you say that exactly, btw?
Orum
2025-03-19 04:57:34
the results I get
2025-03-19 04:58:36
the main problem I have is it's applying noise on a per-pixel level, but if you look at actual grain (e.g. from negative scans or digital sensors) that's basically never the case
2025-03-19 04:59:38
there will of course be some noise on a per-pixel level, but as pixels have to be grouped together for debayering and lenses aren't perfect, it will look different from what JXL does
Demiurge
2025-03-19 05:01:25
You mean real noise is smaller than a pixel?
DZgas Ж color just die
2025-03-19 05:02:47
This looks like the same color problem mentioned recently, the one that strongly affects yellows, orange and reds.
2025-03-19 05:04:21
The one where Jyrki said iirc that at low quality settings the scaling for the color quantization is too aggressive
2025-03-19 05:04:46
Even at d=1 it's pretty bad
DZgas Ж
Demiurge This looks like the same color problem mentioned recently, the one that strongly affects yellows, orange and reds.
2025-03-19 05:05:57
https://discord.com/channels/794206087879852103/794206170445119489/1351931487863181384
Demiurge
2025-03-19 05:06:00
it seems libjxl is tuned within the d = 0.3-1.0 range
Orum
Demiurge You mean real noise is smaller than a pixel?
2025-03-19 05:07:41
generally larger due to the bayer pattern
2025-03-19 05:09:03
I spent a lot of time emulating film grain in blender which could demonstrate this better than just words, but that file is at home and I won't be back there until 2 weeks from now
Demiurge
2025-03-19 05:09:27
A visual example would be nice, yeah
Orum
2025-03-19 05:09:50
well remind me in two weeks <:YEP:808828808127971399>
Demiurge
2025-03-19 05:09:58
I thought the jxl devs really agonized over grain synthesis.
Orum
2025-03-19 05:10:58
TBH I think the grain synth in AV1 is much better, though of course quality depends on which encoder you're using, and there's no real option for doing it in the "proper" way yet (unless grav1synth magically started working)
Demiurge
2025-03-19 05:11:16
Just forgot to add grain detection to the encoder
spider-mario
Demiurge I thought the jxl devs really agonized over grain synthesis.
2025-03-19 05:13:10
much of this was ensuring the absence of a low-frequency component
Demiurge
2025-03-19 05:13:21
Well theoretically what's the difference between jxl's iso noise and "ideal" grain synth?
spider-mario
2025-03-19 05:13:26
and then we retrofitted photon noise in whatever mechanism we had
2025-03-19 05:13:35
(and also in libaom)
2025-03-19 05:13:54
https://aomedia.googlesource.com/aom/+/refs/heads/main/examples/photon_noise_table.c
2025-03-19 05:14:20
but this version also doesn’t really make use of AV1’s capacity for more advanced spatial correlations
2025-03-19 05:14:44
also, the scaling of the ISO value is somehow different from libjxl’s (and I think libjxl’s is more likely to be wrong)
2025-03-19 05:16:18
I have a command-line tool that can take a noisy image and its noiseless version and estimate the ISO parameter to pass, but one thing that made me hesitate to publish it is that the values it gives match libaom’s scaling, not libjxl’s
2025-03-19 05:16:39
I wanted to fix that first
Demiurge
2025-03-19 05:18:32
I see...
2025-03-19 05:19:06
I wonder if there's anything I can help with. I like geeking out over jxl in my free time sometimes...
spider-mario
spider-mario I wanted to fix that first
2025-03-19 05:23:02
(to fix that by fixing the probably-wrong scaling in libjxl, not by making the tool also wrong)
2025-03-19 05:23:41
https://github.com/libjxl/libjxl/blob/798512a9e83c5b36d4e6a097c11bf122d30c1b8f/lib/jxl/enc_photon_noise.cc#L85-L86
Demiurge
2025-03-19 05:24:09
You can't be wrong if you delete all the evidence!
spider-mario
2025-03-19 05:25:40
this would be an encoder-only change, i.e. new images would need to be encoded with a different `--photon_noise=` to produce the same results, but existing images would still decode to visually the same amount of noise since they already have the previous mapping baked into their LUT
2025-03-19 05:26:10
which is part of why it didn’t feel so urgent to fix
2025-03-19 05:26:37
but maybe it would still be good to do so before people get too used to using specific values
spider-mario which is part of why it didn’t feel so urgent to fix
2025-03-19 05:27:40
(another reason is that no functionality is actually lost – it’s enough to just scale the parameter to taste)
jonnyawsom3
2025-03-19 05:29:05
I think there needs to be distinction between grain and noise. AV1 is for grain, from old film or digital recreations of it. JXL is photon noise, from digital cameras and post process filters
AccessViolation_
2025-03-19 07:51:13
I thought AV1 could do both grain and photon noise and possibly more, idk where I got that
Quackdoc
2025-03-19 07:55:14
you can do photon noise with AV1's grainsynth, aomenc added support a while ago iirc
2025-03-19 07:56:12
https://aomedia.googlesource.com/aom/+/refs/heads/main/examples/photon_noise_table.c
spider-mario
2025-03-19 07:57:50
more specifically, I did
2025-03-19 07:58:33
(https://aomedia-review.googlesource.com/c/aom/+/145301)
Quackdoc
2025-03-19 08:01:58
https://cdn.discordapp.com/emojis/867794291652558888?size=64
AccessViolation_
2025-03-19 08:39:37
there is an imposter among us
2025-03-19 08:39:42
improving av1
2025-03-19 08:39:48
<:CatBlobPolice:805388337862279198>
username
2025-03-19 10:26:23
the default of cjxl should be to do lossless JPEG transcoding when given JPEGs as input
2025-03-19 10:27:03
the only other option that matters I guess is `-e` since bumping it up does result in smaller final files
couleur
2025-03-19 10:27:41
whats the conditions for a jpeg image converted to jxl to be recompressibke to jpeg without reencoding?
username
couleur whats the conditions for a jpeg image converted to jxl to be recompressibke to jpeg without reencoding?
2025-03-19 10:28:32
as long as it still has the reconstruction data I guess? I forgot what the box for that is called, i think it might be `jbrd`?
couleur
username as long as it still has the reconstruction data I guess? I forgot what the box for that is called, i think it might be `jbrd`?
2025-03-19 10:30:14
is that some cli tool i should use instead of cjxl?
username
2025-03-19 10:30:45
uhh
2025-03-19 10:30:54
wait what is it that you are asking for exactly?
2025-03-19 10:33:01
if it's how to get back an original JPEG from a JPEG that was losslessly transcoded to a JXL then the answer is to use djxl. there might be some third party tools that support reconstructing JPEGs but for the most part a lot of software doesn't
spider-mario
2025-03-19 10:35:03
yeah, just doing `cjxl`/`djxl` should get you the originals back (but maybe check before deleting them)
username
2025-03-20 02:32:39
JPEGs are reconstructed to be bit identical, so yes the ICC profile will be retained
A homosapien
2025-03-20 02:41:24
No, that's one of the very special features in Jpeg XL, all the data can be represented without loss, ensuring backwards compatibility
2025-03-20 02:46:04
The original data is still there, the tiny difference you see is the because of how the data is interpreted. The original JPEG spec has some leeway in how to decode the image, resulting in different decoders having slightly different outputs. But if you use `djxl` you can recover the original jpeg, completely unchanged
2025-03-20 02:46:49
Also, it's worth noting that libjxl's JPEG decoder is more accurate than the JPEG decoders used in other programs
jonnyawsom3
2025-03-20 03:02:09
TLDR; JPEG to JXL using `cjxl` is lossless and actually higher quality than the original thanks to an improved decoder, which `djxl` can reverse back to the original JPEG
Quackdoc
2025-03-20 03:13:11
I wouldnt call it higher quality, but rather more consistent
jonnyawsom3
Quackdoc I wouldnt call it higher quality, but rather more consistent
2025-03-20 03:36:25
It does score higher though, both in metrics and visually
2025-03-20 03:37:13
Most likely due to CFL and the higher precision decoding
Quackdoc
2025-03-20 03:39:42
best way to support jxl is to keep using it, and report to companies when it doesnt work, phone support forums are a great place for users to ask for support
A homosapien
2025-03-20 06:58:51
For jpeg conversion, distance or quality are not necessary. It's a separate process from the lossy/lossless modes in libjxl which do require those settings.
2025-03-20 06:59:27
The effort setting `-e` is meaningful but I would recommend sticking to the default of 7
2025-03-20 07:06:49
2025-03-20 07:07:24
If you have the spare time to leave your computer running, then higher efforts are fine.
2025-03-20 07:07:50
But effort 7 is a good sweet-spot for speed and size
2025-03-20 07:16:30
Also effort 9 is usually is smaller than effort 10
2025-03-20 07:16:49
Don't ask me why, I'm still trying to figure it out
HCrikki
2025-03-20 07:18:47
for jpg->jxl, efforts higher than e7 dont actually generate gains worth the massively longer duration for a half kilobyte. Can be worth considering if youre maximizing single or avatar-sized images but if youre doing a library conversion its the difference between finishing everything in an hour or spending 3 days to save an extra 12 megabytes total
A homosapien
2025-03-20 07:22:35
Across ~99% of the images the community and I have tested, effort 9 is smaller
username
2025-03-20 07:23:39
how long ago? cause I remember there was something slightly setup wrong in libjxl with effort 9 or 10
A homosapien
2025-03-20 07:23:39
So yeah, pretty unanimous
username how long ago? cause I remember there was something slightly setup wrong in libjxl with effort 9 or 10
2025-03-20 07:23:55
ever since effort 10 was a thing, so like 0.10?
username
2025-03-20 07:24:21
no I mean like where there any real recent tests done
A homosapien
2025-03-20 07:26:27
I was testing the new jpeg recompression tweaks <@794205442175402004> has been working on two weeks ago. Across my smallish test set, effort 9 was consistently smaller than effort 10, both with the tweaks and without.
2025-03-20 07:34:41
That's what I thought, but I didn't find any obvious bugs so far.
username
username how long ago? cause I remember there was something slightly setup wrong in libjxl with effort 9 or 10
2025-03-20 07:53:27
<@207980494892040194> I was asking cause I was thinking about this https://github.com/libjxl/libjxl/pull/3910 although after finding the page for it and looking it might not be so relevant as I thought it might have been although idk
A homosapien
2025-03-20 08:30:25
Yeah, libjxl is the only lossless jpeg -> jxl encoder
username <@207980494892040194> I was asking cause I was thinking about this https://github.com/libjxl/libjxl/pull/3910 although after finding the page for it and looking it might not be so relevant as I thought it might have been although idk
2025-03-20 08:37:21
That was for lossy, and I didn't find any other simple logic errors in the source code. So the issue is more complex unfortunately.
2025-03-20 08:38:04
Cjxl is a part of libjxl, can you rephrase your question?
2025-03-20 08:40:52
The transcoding to and from JXL is lossless. There is no *additional* data lost from the jpeg
2025-03-20 08:41:20
Jpeg is lossy, so you would want to prevent more unnecessary loss for archival/future proofing
2025-03-20 08:44:56
Limited internet speeds and hard drive space means that lossy compression is necessary and it always will be. In a perfect world everything would be lossless.
Demiurge
2025-03-20 08:59:53
Lossy compression is really good for natural images from sensors.
_wb_
2025-03-20 09:44:30
True lossless only exists for synthetic images, and even then, sample values do get quantized which is also a kind of loss (especially when quantizing to 8-bit)
2025-03-20 09:47:06
Sensors are not perfect, and even if they were, there is a sampling of photons which introduces sampling noise.
Demiurge
2025-03-20 11:29:54
Which is why I think it's good if lossy compression is designed with editing/production and generation loss in mind from the beginning
2025-03-20 11:30:22
Lossy formats that are designed to be high quality enough to be used in the production process
2025-03-20 11:30:28
Like JXS
2025-03-20 11:31:04
And theoretically JXL too if the encoder is tuned for that
2025-03-20 11:32:20
"Raw JXL"
2025-03-20 11:32:36
Like what Apple is doing
CrushedAsian255
2025-03-20 11:37:00
That change is due to the slight differences between JPEG XL decoding and JPEG decoding, as JXL decoding is well defined to specific limits where JPEG decoding is more loose. If you compare different JPEG decoders you will get slightly different images
Demiurge
A homosapien I was testing the new jpeg recompression tweaks <@794205442175402004> has been working on two weeks ago. Across my smallish test set, effort 9 was consistently smaller than effort 10, both with the tweaks and without.
2025-03-20 12:00:34
I thought effort 10 was a joke setting
jonnyawsom3
2025-03-20 02:06:16
You were using `-e 10` and not `-E 10` right? The capital is a separate option And yes, the decoded image is different. It uses Chroma From Luma and 32bit precision instead of 8 to get higher quality results than the original file. It's subtle, but it is closer to the original
Demiurge
_wb_ Sensors are not perfect, and even if they were, there is a sampling of photons which introduces sampling noise.
2025-03-20 04:07:58
Ideally, I wish lossy codecs produced artifacts that were closer to natural sensor noise, rather than jarring artifacts that can completely add or subtract visual features
2025-03-20 04:09:37
Sensor noise is easy to recognize and hard to mistake for part of the image.
2025-03-20 04:10:48
Blocking/banding/blurring/smearing is more annoying and at the same time harder to separate from the image.
2025-03-20 04:18:06
If lossy image codecs focused on being as close to natural sensor artifacts as possible it would be easier/safer to use lossy codecs in production and editing without worrying about amplifying artifacts as much, and "too much noise/grain" is a better and more honest and consistent signal of low-quality compared to typical artifacts like blur, color shift, banding and blocking...
2025-03-20 04:20:19
It would be nice if lossy formats could completely replace the use of lossless for natural sensor data, but I don't think lossy formats are designed to be a good or acceptable replacement. They smooth and blur too much instead of preserving natural grit.
2025-03-20 04:21:01
Or have obvious blocking or other artifacts
DZgas Ж
2025-03-20 04:56:58
what is this? at the beginning of the file
jonnyawsom3
Demiurge Ideally, I wish lossy codecs produced artifacts that were closer to natural sensor noise, rather than jarring artifacts that can completely add or subtract visual features
2025-03-20 05:43:34
Days without asking for high frequency image artifacts: 0
Demiurge It would be nice if lossy formats could completely replace the use of lossless for natural sensor data, but I don't think lossy formats are designed to be a good or acceptable replacement. They smooth and blur too much instead of preserving natural grit.
2025-03-20 06:03:27
A very cheap way to do it would be increase ISO noise with distance, that'd get noisy :P
Orum
Days without asking for high frequency image artifacts: 0
2025-03-20 06:41:59
the problem RN is they're too high freq
2025-03-20 06:42:07
or rather, they're not mixed with slightly lower freq
Demiurge
A very cheap way to do it would be increase ISO noise with distance, that'd get noisy :P
2025-03-20 08:04:00
That would at least help to mask/hide all the blurring, so yeah
jonnyawsom3
2025-03-20 08:11:43
`--resampling 8 --photon_noise_iso 250000`
𝕰𝖒𝖗𝖊
2025-03-20 11:29:34
Even effort 6 is around 3-4% less efficient compared to 10.
2025-03-20 11:29:50
2025-03-20 11:30:07
2025-03-20 11:30:42
As you can see, they almost overlap
Demiurge
2025-03-20 11:30:48
No, it's a 100% reversible process and the exact same JPEG image data... but different JPEG decoders have different precision when decoding, and libjxl uses high precision floating point calculations throughout the process when decoding a file, so usually it looks slightly better when decoded by libjxl after being transformed into a JXL, than it would look like using an ordinary old JPEG decoder that uses lower precision calculations.
CrushedAsian255
2025-03-20 11:33:45
yes, decoding is when the image is converted from a compressed image into pixel values
𝕰𝖒𝖗𝖊
2025-03-20 11:34:01
They talk about lossless compression.
2025-03-20 11:34:16
From JPEG to JPEG XL
CrushedAsian255
2025-03-20 11:34:31
Yes, that is a lossless process, as in you can do JPEG -> JXL -> JPEG
2025-03-20 11:34:47
however JPEG -> JXL -> Output is different from JPEG -> JXL -> JPEG -> Output
𝕰𝖒𝖗𝖊
2025-03-20 11:35:08
So a lossless to lossy image won't look better with JXL obviously [kekw~5](https://cdn.discordapp.com/emojis/1167690816010059817.webp?size=128&name=kekw%7E5)
2025-03-20 11:35:20
It would be magic
CrushedAsian255
2025-03-20 11:37:20
yes, qView most likely uses libjxl to decode JPEG XL files, where it would use something like libjpeg-turbo for JPEGs
Demiurge
A very cheap way to do it would be increase ISO noise with distance, that'd get noisy :P
2025-03-20 11:37:31
The added photon noise might make it a bit harder to notice the other, more atrocious looking artifacts, and will also replace some of the high-frequency energy that was probably lost and smoothed over, so it would actually be a visual improvement... although it would be very lazy, to not also tune the quantization matrices for better psycho-visual characteristics and better RDO at the same time. You wouldn't need as much noise to mask artifacts if there was less artifacts to mask in the first place.
CrushedAsian255
𝕰𝖒𝖗𝖊 So a lossless to lossy image won't look better with JXL obviously [kekw~5](https://cdn.discordapp.com/emojis/1167690816010059817.webp?size=128&name=kekw%7E5)
2025-03-20 11:38:00
theoretically if you added something like jpegquantsmooth in the pipeline it may end up looking btter
2025-03-20 11:38:11
but then that would negate the filesize reduction
Demiurge
2025-03-20 11:39:42
The color desaturation problem still needs to be fixed, and the early-avif-esque smearing/vaseline artifacts... Adding a bit of extra noise can help make those problems slightly less obvious and noticeable and I would argue would still be better than nothing, but the root problem can be solved by smarter quantization.
2025-03-20 11:40:31
If the encoder doesn't remove as much noise, then you don't need to add as much noise back in.
2025-03-20 11:41:16
Currently the encoder removes a ton of noise but does not replace it, leaving images looking unnaturally smoothed and blurred, which is the worst situation.
username
2025-03-20 11:43:20
what version of Windows are you on? if it's recent Windows 11 then you could use the Microsoft store addon: https://apps.microsoft.com/detail/9mzprth5c0tb OR you could use this which works with Windows 10 and 11: https://github.com/saschanaz/jxl-winthumb/
Demiurge
2025-03-20 11:45:00
The encoder only needs to replace the same amount of noise it removed from the original. Currently the encoder does not attempt to measure how much noise it removed and does not automatically try to signal/replace it with the iso-noise feature
2025-03-20 11:46:35
Ideally the encoder should compare the original with the lossy result and measure how much noise was actually lost after encoding. So it can signal exactly how much noise should be added back in.
2025-03-20 11:48:00
It sounds so trivial when I put it that way, that I'm really surprised that's not the existing behavior
jonnyawsom3
Demiurge No, it's a 100% reversible process and the exact same JPEG image data... but different JPEG decoders have different precision when decoding, and libjxl uses high precision floating point calculations throughout the process when decoding a file, so usually it looks slightly better when decoded by libjxl after being transformed into a JXL, than it would look like using an ordinary old JPEG decoder that uses lower precision calculations.
2025-03-21 12:05:36
"No, it looks slightly better" So, yes....
2025-03-21 12:09:25
<https://github.com/libjxl/libjxl/issues/1470#issuecomment-1156242387>
2025-03-21 12:11:48
Pretty sure you have to restart the computer
2025-03-21 12:12:04
And put the DLL somewhere safe, it can't be deleted after registering
A homosapien
2025-03-21 12:29:39
libjxl uses a technique called chroma from luma which gives more color detail. If you don't like how it looks you can disable it in cjxl with this flag `--jpeg_reconstruction_cfl 0`.
2025-03-21 12:30:47
Also using that very image you posted, effort 9 was smaller than effort 10.
2025-03-21 12:31:32
```cjxl in.jpg out.jpg -e 9 25158 bytes cjxl in.jpg out.jpg -e 10 25182 bytes```
jonnyawsom3
2025-03-21 12:42:37
Different versions?
A homosapien
2025-03-21 12:50:57
It's highly dependent on the type of image you are compressing. I don't know what kind of content is your folder, but in this case effort 10 is ever so slightly smaller. I usually compress photos and memes, so in all of my use cases effort 9 is smaller.
Demiurge
"No, it looks slightly better" So, yes....
2025-03-21 12:51:56
I mean it doesn't change the data, but it just interprets it slightly better...
jonnyawsom3
2025-03-21 12:54:07
Yeah, that's what we're saying
A homosapien
2025-03-21 12:54:40
I was talking about the paper fundamental jpg you posted here, not the content in your folder. The benchmark numbers show that for that one jpg, effort 9 is smaller.
Quackdoc
2025-03-21 07:00:55
arch's openimageio doesn't have jxl support https://cdn.discordapp.com/emojis/720670067091570719?size=64
Traneptora
2025-03-22 09:23:57
do we submit bug reports to jpegli repo or the libjxl repo?
username
Traneptora do we submit bug reports to jpegli repo or the libjxl repo?
2025-03-22 09:48:44
I think the jpegli one as the libjxl repo is the legacy place for jpegli issues afaik
jonnyawsom3
2025-03-22 09:57:07
Issues *should* go to jpegli, but merges tend to be into libjxl and then pushed to the new repo
2025-03-22 10:06:40
Something makes me doubt this is 3 bits per pixel
2025-03-22 10:07:16
```jxlinfo -v IMG_20250101_172355-9.jxl box: type: "JXL " size: 12, contents size: 4 JPEG XL file format container (ISO/IEC 18181-2) box: type: "ftyp" size: 20, contents size: 12 box: type: "jxlp" size: 24, contents size: 16 JPEG XL image, 3960x2968, lossy, 1-bit RGB num_color_channels: 3 num_extra_channels: 0 have_preview: 0 have_animation: 0 Intrinsic dimensions: 3960x2968 Orientation: 1 (Normal) Color space: RGB, D65, Rec.2100 primaries, sRGB transfer function, rendering intent: Perceptual```
2025-03-22 10:07:25
🤨
juliobbv
Something makes me doubt this is 3 bits per pixel
2025-03-22 10:14:49
2.x BPP compressed, rounded up?
2025-03-22 10:15:04
the fact that it's detected as "8 colors" is hilarious though
jonnyawsom3
2025-03-22 10:16:36
Realised it's because VarDCT is always float32, so bitdepth is quite literally 'just a number' and IrfanView doesn't request any values from libjxl other than '8bit sRGB'
Meow
2025-03-23 02:18:13
`cjpegli` not able to accept JXL really pisses me off
RaveSteel
2025-03-23 03:04:17
Which version are you using? ``` Usage: cjpegli INPUT OUTPUT [OPTIONS...] INPUT the input can be JXL, [...] ```
jonnyawsom3
2025-03-23 03:09:10
It says that, but fails when I just tried
RaveSteel
2025-03-23 03:10:49
It works for me. cjpegli is part of the libjxl package on Arch for me
2025-03-23 03:11:41
Either I am older than you, because not compiled from master, or newer than you, if you use the binary releases
jonnyawsom3
2025-03-23 03:12:27
Mine is from December, 2.14 MB
RaveSteel
2025-03-23 03:12:56
Mine is from a few days ago
2025-03-23 03:15:16
Although I cannot really tell from when the source is, because cjpegli does not show version or commit. for me at least
jonnyawsom3
2025-03-23 03:17:15
5.21 MB now, so I guess static building was broken or it wasn't being included at all
Meow
2025-03-23 05:15:21
I use the independent `jpegli` repo on macOS
Demiurge
2025-03-23 07:28:56
jxl input works for me on arch
2025-03-23 07:42:43
Does the jpegli fork even work?
_wb_
```jxlinfo -v IMG_20250101_172355-9.jxl box: type: "JXL " size: 12, contents size: 4 JPEG XL file format container (ISO/IEC 18181-2) box: type: "ftyp" size: 20, contents size: 12 box: type: "jxlp" size: 24, contents size: 16 JPEG XL image, 3960x2968, lossy, 1-bit RGB num_color_channels: 3 num_extra_channels: 0 have_preview: 0 have_animation: 0 Intrinsic dimensions: 3960x2968 Orientation: 1 (Normal) Color space: RGB, D65, Rec.2100 primaries, sRGB transfer function, rendering intent: Perceptual```
2025-03-23 07:57:06
How was that jxl file produced? It's not invalid to do this, but theoretically it means you are recommending to use 1bpc for the image, which is clearly not actually a good idea. Maybe for hi-res scans of bitonal images it could be a sensible header bitdepth, but not for photos...
Demiurge
2025-03-23 08:10:42
1 bit RGB
2025-03-23 08:14:10
Yep that's weird
2025-03-23 08:14:30
Technically 3 bits, 1 per channel, so 8 unique colors
2025-03-23 08:15:19
What's the average bpp for lossy images on the web? 1.5 bbp?
couleur
2025-03-23 09:11:22
2025-03-23 09:11:30
this meme still true?
A homosapien
2025-03-23 09:14:56
AV2 (called AVM) does compress better (for now), but its super slow, if AV1 is a snail, then AV2 is like a tectonic plate.
couleur
2025-03-23 09:15:46
av2? 🤨
2025-03-23 09:16:30
oh yeah just looked it up damn nice
A homosapien
2025-03-23 09:18:00
I'm assuming AV2 is going to be used in AVIF 2. Unless they want to have the avif container contain different codec payloads (which would be a nightmare to handle)
2025-03-23 09:20:05
Either way it doesn't make sense to make new image formats every 5-8 years. Adoption is hell, even with Google's help ham-fisting WebP down our throats it took forever for it to become mainstream.
2025-03-23 09:21:08
Image formats should not (and cannot) be replaced like a new iphone or car
Demiurge
2025-03-23 09:52:29
You don't need any incompatible bitstream changes to improve on jxl
2025-03-23 09:53:11
Maybe that sort of thing is slightly less pointless for video formats with motion estimation
2025-03-23 09:54:02
But even then it doesn't make much sense because av1 is already so damn slow, it can't get much slower. There's diminishing returns
2025-03-23 09:55:43
Anyways the jxl bitstream format already has plenty of "alien artifacts" and untapped expressiveness so the RDO isn't anywhere close to its potential right now
2025-03-23 10:00:54
It's stupid to thoughtlessly pump out new formats rather than design formats very carefully and thoughtfully, and then build better encoders within those bounds of compatibility
Meow
2025-03-23 10:08:48
Just set `-e 10 -E 4 -I 100 -g 3` by default and call it JPEG XL 2
CrushedAsian255
2025-03-23 10:35:49
Does JXL have intra block copy?
Demiurge
2025-03-23 10:38:48
I think that's just called delta frames and yes, even gif has that
CrushedAsian255
2025-03-23 10:46:18
Intra block is when you take something near the top and use that as a prediction for somewhere below it
2025-03-23 10:46:37
Sort of like patches but part of the core coding instead of as an after-decode feature
_wb_
2025-03-23 12:19:56
Patches can be used in that way
Demiurge
CrushedAsian255 Sort of like patches but part of the core coding instead of as an after-decode feature
2025-03-23 12:34:39
Doesn't sound like there's a difference
jonnyawsom3
_wb_ How was that jxl file produced? It's not invalid to do this, but theoretically it means you are recommending to use 1bpc for the image, which is clearly not actually a good idea. Maybe for hi-res scans of bitonal images it could be a sensible header bitdepth, but not for photos...
2025-03-23 02:15:54
I had a 10bit camera RAW exported to 16bit PNG, so I tried --override_bitdepth 10, but it made no difference. So I tried lowering values down to 1 with no difference at any point
Demiurge
2025-03-23 02:25:13
lol
2025-03-23 02:25:22
It clearly works as intended though
2025-03-23 02:25:28
What difference were you expecting?
2025-03-23 02:25:53
It's lossy mode. So the output depth is only a recommendation
jonnyawsom3
Realised it's because VarDCT is always float32, so bitdepth is quite literally 'just a number' and IrfanView doesn't request any values from libjxl other than '8bit sRGB'
2025-03-23 02:29:12
.
Demiurge
2025-03-23 02:29:23
It reads the input file, converts it to DCT, then sets the "original bitdepth" to 10
2025-03-23 02:31:52
What differences were you expecting to see though when setting the bits to 10
2025-03-23 02:32:02
From 16 bit png
2025-03-23 02:32:23
Converted from 10 bit raw
jonnyawsom3
2025-03-23 02:40:13
None, a slight density improvement like in lossless. Then lowering the tagged bitdepth to lower the output colors, but irfanview only goes down to 24bit for JXL
_wb_
2025-03-23 05:12:39
There is no guarantee that decoders follow the recommendation in the tag
gb82
couleur
2025-03-23 11:49:04
av2 isn't out yet
Meow
2025-03-24 02:04:52
Confirmed that `cjpegli` of libjxl Windows binary can process JXL to JPEG
2025-03-24 02:05:27
In contrast to `cjpegli` of the standalone Jpegli repo
Demiurge
2025-03-24 07:28:53
Why does the separate jpegli repo even exist still? Most of the code is shared code, so isn't it just confusing to keep track of which one is canon or up-to-date??
Meow
2025-03-24 09:05:19
The Jpegli repo now looks somehow simplified actually
Demiurge
2025-03-24 10:17:36
It's a fork
2025-03-24 10:17:42
Almost all the code is shared code
2025-03-24 10:17:52
2 versions of the same thing
2025-03-24 10:18:01
That's not simplification.
2025-03-24 10:18:48
Simplification would be moving some of the `lib/extras` files to the `tools` folder
2025-03-24 10:20:32
Separating and simplifying the essential, library code
Traneptora
2025-03-25 09:10:12
does the JPEG XL codestream orientation have the same meaning as the value in EXIF?
2025-03-25 09:10:23
like do they translate 1-to-1
2025-03-25 09:10:42
I could check the spec and check each one but I'm wondering if it matches up off the top of your head
_wb_
2025-03-25 09:11:03
Yes
2025-03-25 09:11:05
It matches
2025-03-25 09:11:49
In general we tried to match existing enums if it made sense
Traneptora
2025-03-25 09:12:24
for my EXIF overhaul of ffmpeg what I'm planning on doing is, if EXIF orientation is present, setting the codestream orientation tag on encode to equal it, and then *removing* the tag from the EXIF block so that way there' no risk of a decoder conflict
2025-03-25 09:12:35
being not present is by spec equal to default-1 but this way libjxl will just autorotate on decode
_wb_
2025-03-25 09:12:47
(also cicp values for primaries and tf match the jxl enum values)
Traneptora
2025-03-25 09:13:46
the real reason this is important is if the linesize is negative in ffmpeg (which you can do in AVFrame, but not in libjxl) the current method of handling it is sending the image mirrored and setting the exif orientation to vertically mirrored
_wb_
2025-03-25 09:14:45
Negative linesize is how BMP and PFM work, right?
Traneptora
2025-03-25 09:14:54
they're bottom-to-top yea
2025-03-25 09:15:00
no idea about BMP
2025-03-25 09:15:02
but PFM ye
2025-03-25 09:16:44
but now that I have to take into account account an additional matrix, what I'm doing now is composing the two matrices and converting it back to an orientation flag. which still works, but I was wondering if I had to map an orientation -> orientation thing or if I can just use my utility function as-is
_wb_
2025-03-25 09:17:08
I suppose we could allow negative strides in libjxl too, it shouldn't really complicate the code much, right?
Traneptora
2025-03-25 09:17:12
like suppose there's a negative linesize *and* the image is tagged as rotate-and-flip
_wb_ I suppose we could allow negative strides in libjxl too, it shouldn't really complicate the code much, right?
2025-03-25 09:17:31
it requires you to be very careful about the ABI change because `size_t` is your current linesize and it's unsigned
2025-03-25 09:18:00
`ssize_t` is non-standard, and `ptrdiff_t` isn't guaranteed by C spec to equal `ssize_t` in size
2025-03-25 09:18:32
there's some unusual configurations in which they aren't the same (generally not anything you'd see regularlly with clang or gcc) but it's a possible cause of issue
_wb_
2025-03-25 09:19:00
Oh we use size_t, not int? That's annoying
Traneptora
2025-03-25 09:19:15
well you shouldn't use `int` anyway cause `size_t` can be larger (and often is)
2025-03-25 09:19:45
size_t is better than int, in this regard
_wb_
2025-03-25 09:22:11
Yeah, I suppose int32 should be enough usually, but for an image near the max width, it might not be enough
2025-03-25 09:23:19
Anyway I think the exif orientations are closed under composition so it will just be a headache-inducing exercise to make the composition table without errors 🙂
Demiurge
Meow In contrast to `cjpegli` of the standalone Jpegli repo
2025-03-25 09:25:41
That's because the separate jpegli repo was haphazardly ripped out and depends on a lot of shared code with libjxl... since it's missing the jxl decoder code it makes sense that jxl input doesn't work properly. How long is it going to be in a separate repo for? :/
2025-03-25 09:27:18
Ah whoops I was scrolled up too high
Prower
2025-03-26 10:04:14
Is there an obvious way to tell if a JXL file was a JPEG transcode, Modular, or VarDCT encoded? Say I have a library with a mix of JPEGs, PNGs, and HEIFs and I convert them all with with their respective methods, how could I tell them apart without looking at them or naming them?
A homosapien
Prower Is there an obvious way to tell if a JXL file was a JPEG transcode, Modular, or VarDCT encoded? Say I have a library with a mix of JPEGs, PNGs, and HEIFs and I convert them all with with their respective methods, how could I tell them apart without looking at them or naming them?
2025-03-26 10:06:18
`jxlinfo` tells you that information
2025-03-26 10:07:14
Lossy = VarDCT Possibly lossless = Modular Jpeg Reconstruction Data Available = Jpeg Transcode
Prower
2025-03-26 10:09:25
Thanks this is helpful, I'll give it a try
jonnyawsom3
2025-03-26 11:07:30
At a deeper level, it checks `keep_original_profile` in the header. If it's true, it's probably lossless. If it's false, it's lossy. Then if there's a `jbrd` chunk, it can be reconstructed into a JPEG Pitfalls are lossy modular, which uses the original profile flag, and JPEG transcodes with reconstruction disabled, since there'll be no `jbrd`
CrushedAsian255
2025-03-26 11:15:10
but a JPEG transcode without reconstruction data is effectively just a JXL encoded with a low effort
jonnyawsom3
2025-03-27 12:10:55
Reconstruction and Transcoding are separate flags. You still get the size reduction without the reversibility
CrushedAsian255
2025-03-27 12:59:05
no i mean like it can be treated like a generic jxl file
lenscap
2025-03-27 09:44:08
Does anyone have an example of a JXL that has intensitytarget, minnits etc etc for ToneMapping? Trying to find an example to help debug my code...
lenscap Does anyone have an example of a JXL that has intensitytarget, minnits etc etc for ToneMapping? Trying to find an example to help debug my code...
2025-03-28 04:28:55
ahhh never mind. Found https://github.com/libjxl/conformance/tree/master/testcases which is awesome 🙂
jonnyawsom3
2025-03-28 09:57:38
<@794205442175402004> a quick question, can Squeeze use different predictors per level? <@207980494892040194> figured out progressive lossless is so large because it's not using any, possibly due to only seeing the smallest level and basing decisions on the handful of pixels there. I wondered if it could get even better density by examining each level separately as opposed to using one predictor for all
_wb_
2025-03-28 10:14:24
Yes, Squeeze creates new channels per step so every level of residuals has its own channel id, which can be used in an MA tree to select different predictors/contexts per level. Lossy squeeze works by selecting different multipliers per level, which is basically the same as quantizing the residuals with a factor that depends on the level (high freq gets quantized more coarsely than low freq).
CrushedAsian255
_wb_ Yes, Squeeze creates new channels per step so every level of residuals has its own channel id, which can be used in an MA tree to select different predictors/contexts per level. Lossy squeeze works by selecting different multipliers per level, which is basically the same as quantizing the residuals with a factor that depends on the level (high freq gets quantized more coarsely than low freq).
2025-03-29 12:00:46
Since squeeze is using MA trees, can you use x and y selectors to do sort of adaptive quant for lossy squeeze?
2025-03-29 12:01:02
By selecting different multipliers for different leaf nodes in the channel
Demiurge
2025-03-29 02:23:59
Is there any theoretical reason why dct should be any better or faster than squeeze?
2025-03-29 02:24:38
They both seem similar in a lot of ways. Squeeze seems conceptually even simpler.
2025-03-29 02:28:08
Is it possible that Squeeze can be tailored to the Bayer pattern of a raw photo sensor for better compression?
jonnyawsom3
2025-03-29 07:21:47
Bayer shouldn't really be stored in a single plane, we already have the kCFA extra channel for the extra green
Demiurge
2025-03-29 08:28:30
Unless... Can Squeeze synergize well with Bayer data?
2025-03-29 08:29:01
I'm thinking maybe because of the way that Squeeze works it might accidentally separate the bayer channels anyways
2025-03-29 08:30:39
Or it could be intentionally tailored to
Traneptora
2025-03-29 06:43:52
I don't believe squeeze works well with channels that have high variance
2025-03-29 06:43:53
like bayer data
2025-03-29 06:44:09
the tendency function will fail to predict well in those scenarios
Managor
2025-03-29 09:26:28
nvm, I was wrong,
2025-03-29 09:28:59
The fact that the jpegxl.info uses png images is really misleading
Quackdoc
2025-03-29 09:33:02
not really too many other options as wasm decoders are kinda... rough.
Managor
2025-03-29 09:36:40
Just use "This browser doesn't support jpeg xl" placeholders
Demiurge
Quackdoc not really too many other options as wasm decoders are kinda... rough.
2025-03-29 09:59:19
what's wrong with https://github.com/niutech/jxl.js/
Quackdoc
Demiurge what's wrong with https://github.com/niutech/jxl.js/
2025-03-29 10:02:01
slow
2025-03-29 10:02:07
like, uber slow
Demiurge
2025-03-29 10:18:44
But it works. Is there a better alternative at this time? Other than getting Jim Bankowski's decision overturned somehow
Quackdoc
Demiurge But it works. Is there a better alternative at this time? Other than getting Jim Bankowski's decision overturned somehow
2025-03-29 10:23:56
a better alternative? yeah not using it lmao. failing that jxl-oxide's wasm support is better I found, performs marginally better while not almost crashing your browser on harder to render webpages
Demiurge
2025-03-29 10:41:10
What is your alternative for serving images to non-safari users?
2025-03-29 10:42:05
Just don't use jxl then?
2025-03-29 10:43:27
I think it's good enough that people can start serving jxl regardless of browser, and thus put even more pressure on chrome team to reverse their childish decision.
Quackdoc
2025-03-29 11:06:32
yes, for now I simply wouldn't use jxl since it often is a fairly net negative experience. sometimes it can be better or even necessary which is why I did wasm stuff in the first place. but it doesn't suit all use cases
jonnyawsom3
Managor Just use "This browser doesn't support jpeg xl" placeholders
2025-03-29 11:12:04
In a showcase about why you should use JPEG XL, having every demo say "JPEG XL not supported" may not be the best way to improve opinions
Demiurge
2025-03-30 12:28:37
Yeah I think it's better to enable jxl with js fallback.
2025-03-30 12:29:12
"It's slow" is not an issue. I don't notice any slowness even on old and embedded hardware.
2025-03-30 12:30:14
People should start using jxl yesterday.
HCrikki
2025-03-30 12:30:52
the files in the showcase should always have been downloadable. people need premade files they can try in galleries even if current browser doesnt display them
Demiurge
2025-03-30 12:30:55
If everyone starts using it then browsers with good support will have better performance than browsers that need to use a fallback
2025-03-30 12:31:23
It will give browser vendors more reason to quit dragging their feet and inventing asinine excuses
A homosapien
Demiurge what's wrong with https://github.com/niutech/jxl.js/
2025-03-30 12:45:09
<@703028154431832094> Don't you have a website using a WASM jxl decoder? I remember you said it ran well enough.
jonnyawsom3
2025-03-30 12:54:35
I think the key here is, for comparison the images need to be lossless. So using the WASM on lossy JXLs might actually be faster than downloading the PNGs instead
Demiurge
2025-03-30 12:59:52
The "web platform" (cringe) needs a standard way to re-use common shared libraries without downloading them over and over again for each site.
2025-03-30 01:01:17
Like with blake hashes or whatever it takes.
2025-03-30 01:02:20
Maybe browsers are already smart enough to hash js libraries and avoid redownloading identical files...
HCrikki
2025-03-30 01:21:45
ipfs? afaik brave already supports that to some extent, but afaik between ipfs and regular web there's no reuse or caching
gb82
A homosapien <@703028154431832094> Don't you have a website using a WASM jxl decoder? I remember you said it ran well enough.
2025-03-30 02:33:39
Yeah one of my pages I forget which
plantain
2025-03-30 04:42:14
Is libjxl-rs functional?
2025-03-30 04:45:10
Is it worth using it in a new project?
Quackdoc
2025-03-30 04:59:33
last i checked sure if you don't mind gpl
Demiurge "It's slow" is not an issue. I don't notice any slowness even on old and embedded hardware.
2025-03-30 05:00:31
wasm has literally crashed my computer on Firefox from <@288069412857315328> 's jxl manga page
2025-03-30 05:00:55
now, this is because Firefox is shit but even on chrome is slowed my PC to a crawl
A homosapien <@703028154431832094> Don't you have a website using a WASM jxl decoder? I remember you said it ran well enough.
2025-03-30 05:02:10
it worked well on the jxl page with the csgo bench which iirc was the xyb page, it had to be disabled on the corupus page because it was crippling PCs
Demiurge
Quackdoc wasm has literally crashed my computer on Firefox from <@288069412857315328> 's jxl manga page
2025-03-30 05:16:34
lmfao. well if a web page makes a browser crash then that's a browser fault.
2025-03-30 05:18:38
Also image decoding should probably be deferred until the image comes into view...
2025-03-30 05:18:58
if there's a really long web page with lots of images it should wait until you scroll before decoding...
Quackdoc
Demiurge lmfao. well if a web page makes a browser crash then that's a browser fault.
2025-03-30 05:21:17
sure but that doesnt detract from that fact that it is universally a bad experience
Demiurge
2025-03-30 05:26:16
https://niutech.github.io/jxl.js/
2025-03-30 05:26:24
This page works perfectly fine on any browser
2025-03-30 05:26:39
Even on ancient hardware
2025-03-30 05:27:15
Even on firefox
2025-03-30 05:27:37
Do you notice any problem with it?
2025-03-30 05:27:40
I don't
2025-03-30 05:27:53
jxl is ready to use right now
2025-03-30 05:28:15
It will be even better when browsers stop sleeping on it
Quackdoc
2025-03-30 05:31:13
its one page with three images on it
A homosapien
plantain Is it worth using it in a new project?
2025-03-30 05:31:35
It's not finished yet, I recommend using jxl-oxide, it's a complete and fully functional decoder in rust.
plantain
2025-03-30 05:31:57
Is the API the same?
Quackdoc
2025-03-30 05:32:22
this page https://giannirosato.com/blog/post/corpus-lossy/ is not so light
Demiurge
Quackdoc its one page with three images on it
2025-03-30 05:32:31
How many images does it take before it's a problem?
Quackdoc
2025-03-30 05:32:46
hard to say, I have a fork of this some where one sec
2025-03-30 05:32:51
its been a while
Demiurge
2025-03-30 05:32:56
It doesnt need to be perfect in all situations, it only needs to be good enough in most situations.
2025-03-30 05:33:16
the rest will solve itself when firefox and chrome stop being stupid
2025-03-30 05:33:40
but no progress will be made if people are afraid to use what we have right now
2025-03-30 05:33:46
don't let perfect be the enemy of good
Quackdoc
2025-03-30 05:34:14
https://github.com/Quackdoc/gianni-rosato.github.io/commit/b7337cf216b07b46958f62ebd9aecb57031bb51a
2025-03-30 05:34:45
I dont have the one with jxl-oxide which did perform much better
2025-03-30 05:35:35
its old now but the jxl-wasm stuff for jxl-oxide is here https://github.com/Quackdoc/jxl-wasm
2025-03-30 05:35:47
tirr's demo was not a drop in solution IIRC
A homosapien
plantain Is the API the same?
2025-03-30 05:37:03
I think no
Demiurge
Quackdoc this page https://giannirosato.com/blog/post/corpus-lossy/ is not so light
2025-03-30 05:38:24
When I scroll on a phone the images load and unload
2025-03-30 05:38:31
But it doesn't work in firefox
jonnyawsom3
2025-03-30 10:44:31
My phone doesn't load any images
RaveSteel
2025-03-30 11:37:27
Works fine with Thorium on my phone
jonnyawsom3
2025-03-30 03:26:22
Oh, I thought this was about WASM decoding
Demiurge
My phone doesn't load any images
2025-03-30 03:48:06
You don't have an iPhone?
Oh, I thought this was about WASM decoding
2025-03-30 03:48:37
I guess that page doesn't have a JavaScript polyfill?
2025-03-30 03:51:17
Works fine on my iPhone but not on firefox on my desktop
Meow
2025-03-31 06:12:08
Is this accurate enough? https://chatgpt.com/share/67ea3217-be30-8009-a5f0-5a45a7a16767
2025-03-31 06:12:22
I can't find many about JXL vs EXR
monad
2025-03-31 06:42:32
JXL supports 32-bit float
Demiurge
2025-03-31 07:31:05
Random number generators tend to be inaccurate unless their output is tuned for a well-defined purpose.
2025-03-31 07:32:01
ChatGPT is tuned to generate plausible-seeming randomness
jonnyawsom3
2025-03-31 07:52:24
> 8, 10, 12, 16 bits per channel Feels like it sourced that from the half finished Blender PR with the same options
محمد
2025-03-31 07:59:14
jonnyawsom3
2025-03-31 08:00:35
That was a demo of compression artifacts and a crop of the original image, lossless wouldn't have any artifacts to show
Meow
> 8, 10, 12, 16 bits per channel Feels like it sourced that from the half finished Blender PR with the same options
2025-03-31 12:26:36
ChatGPT users: lol JPEG XL sucks as it lacks deep color features and is not precise enough!
2025-03-31 12:28:00
~~AVIF~~ OpenEXR looks better
2025-03-31 04:12:56
How do people convert ProRAW DNG to JXL while maintaining the same colour depth all the time?
_wb_
Meow Is this accurate enough? https://chatgpt.com/share/67ea3217-be30-8009-a5f0-5a45a7a16767
2025-03-31 06:25:58
No. About 1/3rd of the information is wrong or misleading.
Quackdoc
2025-03-31 06:58:23
that is very generous lol
Demiurge
2025-04-01 01:12:06
All my homies use <:JXL:805850130203934781>
DZgas Ж
2025-04-01 02:11:24
finally Mjxl.avi
festus101
2025-04-01 02:52:32
any tips on installing jxl on a really simple board that doesn't even have apt install?
2025-04-01 02:52:35
or any package manager
Quackdoc
2025-04-01 02:56:32
a good step would be to take a look at what other package managers are doing
Demiurge
any tips on installing jxl on a really simple board that doesn't even have apt install?
2025-04-01 03:38:41
Yeah, just download the static binaries from github? they work good.
festus101
Demiurge Yeah, just download the static binaries from github? they work good.
2025-04-01 05:33:48
aren't those only for windows?
Demiurge
2025-04-01 05:38:30
No? There are linux binaries too
Meow
Meow Is this accurate enough? https://chatgpt.com/share/67ea3217-be30-8009-a5f0-5a45a7a16767
2025-04-01 05:43:23
Bonus: Answers from Gemini and Grok https://g.co/gemini/share/422b7119438c https://x.com/i/grok/share/QHt46KxSMHLsDfZQ1QEunhv1b
Quackdoc
2025-04-01 05:50:00
what is with these and HDR?
2025-04-01 05:51:00
that being said the gemini one isnt bad
2025-04-01 05:54:04
grok isnt as offensive as the other one, but its not super great
Meow
Quackdoc that being said the gemini one isnt bad
2025-04-01 05:57:35
Gemini provides the least details so being more accurate
CrushedAsian255
Meow Gemini provides the least details so being more accurate
2025-04-01 11:35:52
DeepSeek-R1 **Comprehensive Comparison of JPEG XL and OpenEXR** 1. **Primary Use Cases:** - **OpenEXR:** Dominates in professional environments like VFX, animation, and film production. Excels in high dynamic range (HDR) imaging, storing layered/composited data, and handling deep data for complex scenes (e.g., volumetric effects). - **JPEG XL:** Targets general-purpose use, including web images, photography, and archival storage. Balances high-quality lossy and lossless compression, suitable for HDR photography and efficient web delivery. 2. **Compression & File Size:** - **OpenEXR:** Offers both lossless (e.g., ZIP, PIZ) and lossy (e.g., DWAA/B) compression. Prioritizes preserving detail over file size, leading to larger files. - **JPEG XL:** Advanced lossy (VarDCT) and lossless (Modular) compression. Achieves smaller file sizes with minimal quality loss, ideal for bandwidth-constrained applications. 3. **Bit Depth & HDR Support:** - **OpenEXR:** Uses 16/32-bit floating-point per channel, essential for precise HDR workflows (e.g., avoiding clipping in extreme brightness). - **JPEG XL:** Supports up to 32-bit integer HDR, sufficient for most HDR photography but lacks floating-point precision, making it less suited for VFX compositing. 4. **Features & Metadata:** - **OpenEXR:** Rich features include layers, multipart files, deep data (per-pixel depth), and arbitrary metadata. Critical for frame-by-frame compositing and VFX pipelines. - **JPEG XL:** Supports animation, transparency, and basic metadata. Lacks deep data/layers, focusing on simplicity and broad compatibility. 5. **Adoption & Compatibility:** - **OpenEXR:** Industry standard in film/VFX, supported by tools like Blender, Maya, and Nuke. Limited browser/consumer software support. - **JPEG XL:** Growing adoption in web/consumer applications (e.g., browsers, image tools). Not yet mainstream in professional VFX.
2025-04-01 11:35:53
6. **Performance:** - **OpenEXR:** Slower encode/decode due to high bit depth and complex compression. Optimized for accuracy, not speed. - **JPEG XL:** Designed for efficient streaming/decoding, faster performance in web contexts. 7. **Licensing:** - **OpenEXR:** Open-source (BSD-3), widely adopted in commercial software. - **JPEG XL:** Royalty-free, encouraging broad ecosystem adoption. **When to Use Each:** - **Choose OpenEXR** for VFX, film, or HDR workflows requiring floating-point precision, layers, or deep data. - **Choose JPEG XL** for web, photography, or archiving where smaller file sizes, HDR support, and broad compatibility are priorities. **Overlap:** JPEG XL may replace OpenEXR in non-critical HDR scenarios (e.g., consumer photography) where file size matters. However, OpenEXR remains irreplaceable in precision-demanding professional workflows.
couleur
2025-04-01 11:38:11
what is the openexr licensing? royalty free is only part of it
Meow
couleur what is the openexr licensing? royalty free is only part of it
2025-04-01 12:07:04
Modified BSD License
2025-04-01 12:25:37
> JPEG XL: Supports up to 32-bit integer HDR, sufficient for most HDR photography but lacks floating-point precision, making it less suited for VFX compositing. Really?
2025-04-01 12:26:35
> JPEG XL: Supports animation, transparency, and basic metadata. Lacks deep data/layers, focusing on simplicity and broad compatibility. 🤨
2025-04-01 12:28:23
> OpenEXR: Industry standard in film/VFX, supported by tools like Blender, Maya, and Nuke. Limited browser/consumer software support. Is there any browser supporting OpenEXR???
2025-04-01 12:32:50
Give me anything that OpenEXR can do but JPEG XL can't do
Demiurge
2025-04-01 12:38:20
Bizarre that it says jxl is for integer sample data
_wb_
2025-04-01 12:38:27
I don't think there is anything. Feature parity with EXR was intended when we designed jxl, iirc.
Demiurge
2025-04-01 12:38:41
Why are we asking random number generators to tell us things again?
couleur
2025-04-01 01:00:33
wb itd be interesting if you made comparisons like this but with real information
Meow
2025-04-01 01:01:32
I guess nobody has done it so LLM can't really answer with correct information
spider-mario
2025-04-01 02:54:49
maybe Gemini’s “Deep Research” would handle that better, let me try
2025-04-01 02:55:40
here is its research plan
2025-04-01 02:56:37
2025-04-01 02:56:43
> My initial understanding is that they likely serve different primary purposes, given their distinct names. flawless reasoning
2025-04-01 02:57:22
2025-04-01 02:59:56
here is its final report https://docs.google.com/document/d/e/2PACX-1vQlB8KzjFhcW2JbjHfA5Pt4sUQ_T9B4Ew1Un3S0skIG_1hS80MDCcHwRUkC20JrWarbWR8AbfO0yiro/pub
2025-04-01 03:04:07
it seems to be more words and tangents for ultimately the same conclusion
2025-04-01 03:05:26
ooh, it considers jxl an “emerging” industry standard 😎
2025-04-01 03:05:37
maybe I should ask it to write a report making the case for JXL in Chrome
Meow
2025-04-01 03:10:23
They keep saying JPEG XL for web and general usages, and OpenEXR for professional usages
spider-mario
2025-04-01 03:20:54
jonnyawsom3
2025-04-01 03:21:07
Good luck with that
spider-mario
2025-04-01 03:28:56
this actually looks quite reasonable
2025-04-01 03:32:03
> Despite Chrome's initial assessment of limited ecosystem interest, the support for JPEG XL has been steadily growing. Apple's integration into Safari, alongside backing from Adobe, announced support from Samsung, and various open-source initiatives, indicates a significant and increasing level of industry buy-in. This growing ecosystem challenges the "lack of interest" argument previously cited by Chrome. […] > > Given these factors, it is recommended that Google Chrome reconsiders its decision and reinstates support for the JPEG XL image format.
2025-04-01 03:32:14
(I didn’t ask it to reach that conclusion)
2025-04-01 03:32:49
what I asked was exactly this: > Should Chrome add support for JPEG XL, given that it has already added support for AVIF?
Meow
2025-04-01 03:43:21
Gemini would run significantly slower on future Chrome versions😤
2025-04-01 03:45:20
Google is also known for its internal sabotages
Quackdoc
_wb_ I don't think there is anything. Feature parity with EXR was intended when we designed jxl, iirc.
2025-04-01 08:02:54
iirc there are some differences, but no major ones I can remeber off hand
Meow
Quackdoc iirc there are some differences, but no major ones I can remeber off hand
2025-04-02 01:15:11
In terms of features?
Quackdoc
2025-04-02 01:18:17
yeah like openexr has no limits on image channels
Meow
2025-04-02 01:48:27
Does the industry require more than 4,099 channels?
CrushedAsian255
2025-04-02 01:57:11
yes!!! we need 2147483647 channels!
Quackdoc
Meow Does the industry require more than 4,099 channels?
2025-04-02 02:05:07
no idea, I would assume in some niche cases probably
Meow
2025-04-02 05:00:44
Everyone wants 4,100 channels and more
festus101
Demiurge Yeah, just download the static binaries from github? they work good.
2025-04-02 05:53:19
My board is 32-bit and I think the binaries are only 64-bit, right?
Meow
My board is 32-bit and I think the binaries are only 64-bit, right?
2025-04-02 09:33:13
`jxl-x86-windows-static.zip` is for 32-bit
username
Meow `jxl-x86-windows-static.zip` is for 32-bit
2025-04-02 09:50:18
they are not on Windows
HCrikki
2025-04-02 12:22:53
High layer counts would only make sense for niche uses (abov/underground mapping, 'action as a layer' raster editing, collaborative editing of a single image) but even if its not actively used with .jxl files at least its futureproof. The high limit enables specialized file formats (like proprietary ones) to replace their limited ancient implementations and not need new implementations for a very long time
Demiurge
My board is 32-bit and I think the binaries are only 64-bit, right?
2025-04-02 08:57:44
I didn't realize. It looks like they are 64 bit only.
2025-04-02 08:59:26
Your only option is to compile it yourself, which I or someone else here can help you with, or find a package/ports manager to do it for you, like maybe Linuxbrew
jonnyawsom3
2025-04-02 11:38:20
Makes me wonder if there's a way to consolidate one predictor across multiple contexts... Or just cull contexts based on identical node results
2025-04-02 11:40:10
I assume either this is necessary or the impact is negligible, but makes me laugh nonetheless seeing such a huge tree always pointing to seeminly the same thing
2025-04-02 11:41:49
CrushedAsian255
2025-04-03 01:10:25
It’s entropy encoded so most likely wasting 50-100 bytes at most
2025-04-03 01:10:48
The actual distributions are clustered so it’s not like there are that many actual ANS contexts
jonnyawsom3
2025-04-03 01:34:21
I was thinking of tree traversal too, lots of branching for the same results
CrushedAsian255
2025-04-03 02:33:48
Tree traversal should still only be as slow as the depth of the tree
jonnyawsom3
2025-04-03 03:08:08
Yeah, but this is one of the deepest parts too. Around 50% longer than the rest, or 5 nodes deeper out of 10
_wb_
2025-04-03 05:41:24
Do we simplify the tree to cut decision nodes that lead to the exact same two leaves after ctx clustering? I don't think this is implemented and it should be a no-brainer since it can only speed up decoding and reduce signaling overhead.
CrushedAsian255
_wb_ Do we simplify the tree to cut decision nodes that lead to the exact same two leaves after ctx clustering? I don't think this is implemented and it should be a no-brainer since it can only speed up decoding and reduce signaling overhead.
2025-04-03 05:43:01
How does it pick when to split?
2025-04-03 05:43:22
Does it start off with a more descriptive tree but then cluster similar distributions together?
jonnyawsom3
2025-04-03 06:31:07
Growing a tree and then pruning it does sound like a very organic way to do it Is there a way to limit tree depth currently? It could be useful for faster decoding levels too
Orum
2025-04-03 06:35:29
is it the <:JXL:805850130203934781> spec that doesn't support CMYK, or just `cjxl`/libjxl that doesn't?
2025-04-03 06:36:24
e.g. when transcoding a CMYK JPEG I get this: `Error while decoding the JPEG image. It may be corrupt (e.g. truncated) or of an unsupported type (e.g. CMYK).`
A homosapien
2025-04-03 06:43:57
CMYK transcoding is not within the spec
2025-04-03 06:44:07
3 channels for VarDCT
jonnyawsom3
2025-04-03 06:44:38
VarDCT has a hardcoded 3 channel limit, the 4th (Alpha or K in CMYK) has to be modular encoded
2025-04-03 06:46:33
You can use -j 0 to disable the transcoding, though you'll probably need to do lossy for any space savings. Would be nice if we could store the CMY with transcode and the K lossless anyway for the savings
CrushedAsian255
You can use -j 0 to disable the transcoding, though you'll probably need to do lossy for any space savings. Would be nice if we could store the CMY with transcode and the K lossless anyway for the savings
2025-04-03 09:26:18
You wouldn’t be able to do bit identical reconstruction but it would be nice for it to be able to at least copy the dct coefficients
Demiurge
2025-04-03 01:24:30
cmyk jpeg is very inefficient for storage compared to normal jpeg
2025-04-03 01:24:49
It's only meant for a specific printer
2025-04-03 01:25:16
Whichever printer and inks it was made for
2025-04-03 01:25:30
It's much larger than a normal jpeg
2025-04-03 01:25:52
It's recommended not to use them at all and find the original file before it was converted to cmyk
Orum
2025-04-03 06:40:40
easier said than done
fabmenore
2025-04-04 05:46:46
Hello, I am trying to convert my photo library to JXL. Does anyone know an effective way to keep HDR from iPhone photos (in HEIF format)? I am using XnViewer to do batch convert but it seems like the result does not preserve that (I can tell by opening the photo on my Mac, with the original the photo is displayed with a very bright screen, the JXL shows darker).
Demiurge
2025-04-04 06:08:47
Good question. Need something that can decode HEIC with gainmap properly. Anyone know if magick or vips can?
2025-04-04 06:29:03
Looks like almost nothing can decode Apple's dumb HEIC into a normal HDR file. your best bet is maybe https://github.com/johncf/apple-hdr-heic but it's not very easy to use. You can decode HEIC to EXR or AVIF and then use vips to convert to JXL. `apple-hdr-heic-decode input.heic output.avif -b 12 -y 444` `vips jxlsave output.avif output.jxl --distance=1`
fabmenore
Demiurge Looks like almost nothing can decode Apple's dumb HEIC into a normal HDR file. your best bet is maybe https://github.com/johncf/apple-hdr-heic but it's not very easy to use. You can decode HEIC to EXR or AVIF and then use vips to convert to JXL. `apple-hdr-heic-decode input.heic output.avif -b 12 -y 444` `vips jxlsave output.avif output.jxl --distance=1`
2025-04-04 06:31:03
Will take a look, thanks!
jonnyawsom3
_wb_ Do we simplify the tree to cut decision nodes that lead to the exact same two leaves after ctx clustering? I don't think this is implemented and it should be a no-brainer since it can only speed up decoding and reduce signaling overhead.
2025-04-04 05:34:33
Another example. This time using the same decision nodes, which then lead to the same leaves
2025-04-04 05:35:15
The black is no predictor
_wb_
2025-04-04 05:36:00
It's the combination of predictor and context that matters
jonnyawsom3
2025-04-04 05:37:12
Yeah, I just realised it's probably because a decision tree can only link to 2 nodes, so to use all the contexts in specific channels, it needs to create new nodes for the leaves to link to
2025-04-04 05:41:19
It's part of a lossless squeeze tree. I was trying to figure out what predictor works best, then realised it's almost always 0 until it hits the residuals and then requires more predictor types
CrushedAsian255
2025-04-05 03:50:38
10 layers deep
fabmenore
Demiurge Looks like almost nothing can decode Apple's dumb HEIC into a normal HDR file. your best bet is maybe https://github.com/johncf/apple-hdr-heic but it's not very easy to use. You can decode HEIC to EXR or AVIF and then use vips to convert to JXL. `apple-hdr-heic-decode input.heic output.avif -b 12 -y 444` `vips jxlsave output.avif output.jxl --distance=1`
2025-04-05 08:31:09
hi! I just tried this, apple-hdr-heic managed to convert the HEIC to avif (a very heavy file if compared with the source) preserving the hdr, but using vips to convert from avif to jxl makes a grey-ish photo
Meow
2025-04-05 08:42:21
I don't really know how to deal with HEIC to (with many steps) JXL
2025-04-05 08:43:17
especially if that's 10-bit HEIC to 10-bit JXL
Demiurge
hi! I just tried this, apple-hdr-heic managed to convert the HEIC to avif (a very heavy file if compared with the source) preserving the hdr, but using vips to convert from avif to jxl makes a grey-ish photo
2025-04-05 08:45:45
Maybe converting to EXR would be better, but be sure to keep track of and specify the color primaries and transfer curve etc
2025-04-05 08:46:25
cjxl takes exr input
Meow
2025-04-05 08:49:46
That would be 10-bit to 16-bit which would be meaningless
2025-04-05 08:50:25
And all HEIC pictures taken by iPhone are lossy
2025-04-05 08:55:01
If the purpose is simply archival I would just leave them alone
fabmenore
Meow If the purpose is simply archival I would just leave them alone
2025-04-05 09:03:12
that makes sense 😅 I was just looking for good compression without sacrificing much quality, but since iphone's heic are not that heavy, I think I can live with that