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

tools

_wb_
2024-03-11 09:17:38
this is what we get for treating alpha as a special case and not properly testing other kinds of extra channels :/
yoochan
2024-03-11 09:20:20
looks like a convoluted way to say : "I told you so" ๐Ÿ˜„
_wb_
2024-03-11 10:40:11
nah, RGBA is common enough to deserve some special casing, it's just easy to miss other kinds of extra channels because they're not really common โ€” e.g. none of the input formats we have, actually supports that.
JendaLinda
2024-03-11 05:20:12
There are not many formats supporting more than 4 channels. As an alternative, cjxl might process set of grayscale images as extra channels.
yoochan
2024-03-11 05:55:53
Yet jxl would be perfect for multispectral data, where tiff are used
Traneptora
2024-03-11 08:18:08
it makes sense to special case alpha cause many formats support alpha as their only type of extra channel
2024-03-11 08:18:10
such as PNG
CrushedAsian255
2024-03-11 08:40:56
I think heic can but thatโ€™s more a container for HEVC blocks
JendaLinda
2024-03-11 09:40:26
I would say in several image formats alpha is not an extra channel, it is stored as fourth color channel.
fab
2024-03-28 10:42:30
2024-03-28 10:55:47
<@1028567873007927297> can you send me latest pdf in this Channel
2024-03-28 10:58:26
Ah ok did That, is that pdf
2024-03-28 11:03:45
Demiurge
2024-03-28 11:34:50
I am just a fox, idk what you want from me ๐ŸฆŠ
harry
2024-06-02 09:43:32
ooi, is there a tool/method to check if a jxl image was encoded in modular mode? `jxlinfo --verbose` doesn't seem to output that info. I'm trying to add support for modular mode to libvips and this would be handy to check that it's working
CrushedAsian255
2024-06-02 09:45:20
All JXLs have modular parts, as VarDCTโ€™s DC components are modular
harry
2024-06-02 10:39:46
I was under the impression that you could encode an entire image with modular mode, i.e. with `cjxl --modular`, which is a better setting to replace lossless formats (like PNG). Am I misunderstanding something fundamental here?
CrushedAsian255
harry I was under the impression that you could encode an entire image with modular mode, i.e. with `cjxl --modular`, which is a better setting to replace lossless formats (like PNG). Am I misunderstanding something fundamental here?
2024-06-02 10:59:16
Oh you mean specifically only modular
2024-06-02 10:59:24
Yes that exists
2024-06-02 10:59:38
In not store hours to detect that
_wb_
harry I was under the impression that you could encode an entire image with modular mode, i.e. with `cjxl --modular`, which is a better setting to replace lossless formats (like PNG). Am I misunderstanding something fundamental here?
2024-06-02 11:27:13
it's not really something that is exposed in the libjxl api, since it is considered an internal encoder choice. But generally speaking, if `jxlinfo` says it is "(possibly) lossless", and it's not a losslessly recompressed jpeg, then chances are very high that it is a modular mode image.
harry
2024-06-02 11:40:14
Is it correct to consider lossless modular mode (i.e. `cjxl -q 100 -m 1`) as the "PNG replacement" setting? That's how I've seen it in my head, where VarDCT is for re-encoding JPEGs. It seems like an important distinction (rather than an internal encoder choice) to tune/deploy JXL on a workload split between JPEG and PNG
2024-06-02 11:42:11
But maybe my brain is stuck in the past, where some images are better for PNG and others for JPEG, and I'm incorrectly mapping this to the modular and VarDCT modes
2024-06-02 11:43:07
> if jxlinfo says it is "(possibly) lossless", and it's not a losslessly recompressed jpeg, then chances are very high that it is a modular mode image. That's very helpful, thankyou!
CrushedAsian255
2024-06-02 12:19:31
correct that `-q 100` is a replacement for PNG as it is lossless (btw you don't need `-m 1` because this is implied in lossless mode), but VarDCT is also used for creating new lossy JPEG XL images
JendaLinda
2024-06-02 01:40:57
Indeed, `-q 100` is equivalent to `-d 0` which is truly lossless like PNG and will use Modular exclusively. Additionally, Modular can be enforced in lossy mode with the `-m 1` switch, turning VarDCT off, although lossy Modular is not really practical at the moment.
2024-06-02 01:50:02
Actually, setting the lossless quality by `-q 100` or `-d 0` switches the encoder to a special mode where it uses only features that don't change the contents of the image. Setting the quality to any other value will set the relative quality for lossy compression and the compressed image will be always different from the original.
Demiurge
harry Is it correct to consider lossless modular mode (i.e. `cjxl -q 100 -m 1`) as the "PNG replacement" setting? That's how I've seen it in my head, where VarDCT is for re-encoding JPEGs. It seems like an important distinction (rather than an internal encoder choice) to tune/deploy JXL on a workload split between JPEG and PNG
2024-06-02 08:24:04
Lossless jxl is essentially a png replacement. It's much better than png and it's good at the same kinds of images png is good at. Sometimes lossless jxl is even smaller than lossy jxl, just like png is sometimes smaller than jpeg, for non-photographic images.
Quackdoc
JendaLinda Indeed, `-q 100` is equivalent to `-d 0` which is truly lossless like PNG and will use Modular exclusively. Additionally, Modular can be enforced in lossy mode with the `-m 1` switch, turning VarDCT off, although lossy Modular is not really practical at the moment.
2024-06-02 08:25:37
disagree lossy modular is great for comics and animated pictures, it is still slower to decode but not extremely so
JendaLinda
Quackdoc disagree lossy modular is great for comics and animated pictures, it is still slower to decode but not extremely so
2024-06-02 09:05:05
Lossy Modular looks worse than VarDCT, IMO.
jonnyawsom3
2024-06-02 09:07:00
Depends on image, distance and settings
JendaLinda
2024-06-02 09:14:49
Perhaps it can be fine tuned but at the default distance of 1, Modular has more visible color distortion than VarDCT at the same distance.
w
2024-06-02 09:51:19
it is extremely slower to decode
CrushedAsian255
2024-06-02 11:24:30
does Modular even support progressive decoding?
w
2024-06-02 11:25:55
yes but the decode is so slow any download will be done before the first pass
Quackdoc
w yes but the decode is so slow any download will be done before the first pass
2024-06-02 11:37:55
thats a massive overstatement, even when decoding at 15kx8k image encodied with `-d 2 -m 1 -e 7` it only takes a second on my s9+ and 6 seconds on only the 4 little cores, 1.7s on just the 4 big cores on termux.
2024-06-02 11:38:26
if you limit it to the little cores sure, but the big cores are more then enough, and this is a fairly older phone now
2024-06-02 11:39:05
3 sec on 2 little and 2 big cores
w
2024-06-02 11:47:21
idk when I try to load this <https://m.grass.moe/chapter/lacking_54> on my s10e it takes two minutes to show 2 pages then everything on my phone crashes
2024-06-02 11:47:29
real world example here
Quackdoc
2024-06-02 11:49:57
I opened this on my desktop and firefox (vanilla with addon) crashed [av1_dogelol](https://cdn.discordapp.com/emojis/867794291652558888.webp?size=48&quality=lossless&name=av1_dogelol)
w
2024-06-02 11:50:28
even 1.7s is extremely slow
Quackdoc
2024-06-02 11:50:30
w even 1.7s is extremely slow
2024-06-02 11:50:54
perhaps in comparison, but its still "fast enough" for many uses
w
2024-06-02 11:51:17
no that is not fast enough at all, not even close
2024-06-02 11:51:24
get real
Quackdoc
2024-06-02 11:51:32
?
2024-06-02 11:51:42
i use it on my phone all the time
w
2024-06-02 11:52:10
so?
Quackdoc
2024-06-02 11:52:25
its plenty fast
w
2024-06-02 11:52:34
for you
Quackdoc
2024-06-02 11:53:25
for many
w
2024-06-02 11:54:09
I'll look at an image for less than a second. I'm not going to wait twice that for it to load
Quackdoc
2024-06-02 11:54:49
on a slow connection it will take a lot longer then that to download it lmao
w
2024-06-02 11:55:03
on a slow connection my ass
Quackdoc
2024-06-02 11:55:26
guess you don't use slow connections lol
w
2024-06-03 12:02:42
aren't you canadian
2024-06-03 12:02:56
Absolute minimum speed in Canada is 50mbps
jonnyawsom3
w idk when I try to load this <https://m.grass.moe/chapter/lacking_54> on my s10e it takes two minutes to show 2 pages then everything on my phone crashes
2024-06-03 12:03:16
44 seconds for 2 pages, about a minute for 4 pages on a 7 year old Huawei Mate 10 Pro using Waterfox. But yeah, RAM crapped out and there was a very specific hotspot on the CPU
Quackdoc
w Absolute minimum speed in Canada is 50mbps
2024-06-03 12:05:17
thats absolutely hilarious
2024-06-03 12:05:38
i still occasionally make house calls to people that only get around 2mbps down at max
jonnyawsom3
2024-06-03 12:06:36
I think the main issue here is just the resolution of the pages. Ignoring decode cost it's over 2GB of image data alone
Quackdoc
2024-06-03 12:06:46
and this is discounting data
2024-06-03 12:07:06
cellular data can be slow as molasses
w
2024-06-03 12:08:33
cellular data is even faster
2024-06-03 12:08:44
even in rural areas
2024-06-03 12:08:56
wake up
Quackdoc
2024-06-03 12:08:58
maybe if you have great signal
2024-06-03 12:09:16
>wake up ah yes, im living in the matrix
jonnyawsom3
w cellular data is even faster
2024-06-03 12:10:42
> on a 7 year old Huawei Mate 10 Pro It's less "wake up" and more "get a new phone"
w
2024-06-03 12:11:28
a newer device won't make it much faster
jonnyawsom3
2024-06-03 12:11:35
Last week I was at a convention, 3K people brought the towers to their knees so it was 2 bar 3G if I was lucky, nothing at worst. I was unironically converting to JXL on my phone to then send to my friends
w a newer device won't make it much faster
2024-06-03 12:11:48
I assumed you meant 5G, ect
w
2024-06-03 12:12:01
I mean decode speed
Quackdoc
w idk when I try to load this <https://m.grass.moe/chapter/lacking_54> on my s10e it takes two minutes to show 2 pages then everything on my phone crashes
2024-06-03 12:13:53
finally got some of the images downloaded, is not that bad, most likely the browser is trying to decode them all at once crippling the device. ```ps ~/img $ time djxl 01D.jxl --disable_output JPEG XL decoder v0.10.2 [NEON_WITHOUT_AES] Decoded to pixels. 4318 x 6061, 10.866 MP/s [10.87, 10.87], , 1 reps, 8 threads. real 0m2.571s user 0m16.260s sys 0m1.100s ```
username
2024-06-03 12:23:27
when I was younger I had a slow computer and slow internet, now I have a fast computer and slow internet. the area I live in literally doesn't provide faster internet plans
Quackdoc
2024-06-03 12:24:26
whats interesting about this page is that it looks like neither thorium nor waterfox will properly use lazy loading
w
2024-06-03 12:33:34
yup even with loading=lazy
2024-06-03 12:33:45
because when they're not loaded they're all 0px in the same place
afed
2024-06-03 12:38:50
even without images there is a very high cpu load on this page <:kekw:808717074305122316>
Quackdoc
2024-06-03 12:43:22
0.0
w
2024-06-03 12:45:10
power of live updating as I find out dynasty now converts to and only serves webp
Demiurge
JendaLinda Lossy Modular looks worse than VarDCT, IMO.
2024-06-03 01:11:54
Sometimes, it can look better.
JendaLinda Perhaps it can be fine tuned but at the default distance of 1, Modular has more visible color distortion than VarDCT at the same distance.
2024-06-03 01:12:37
It does have more color distortion though. But then again VarDCT mode in libjxl has terrible color distortion imo too
w it is extremely slower to decode
2024-06-03 01:13:39
If you set the effort to 3 or below, is it still slow?
w
2024-06-03 01:13:49
why would I do that
Demiurge
2024-06-03 01:14:19
Because default effort setting is unacceptably slow at default settings
w
2024-06-03 01:14:50
makes it worse than webp
Demiurge
2024-06-03 01:15:55
Yeah but e=3 is instantaneous. e=7 is molasses by comparison
w
2024-06-03 01:16:04
to decode?
Demiurge
2024-06-03 01:16:09
And encode
2024-06-03 01:16:10
Both
2024-06-03 01:16:48
I know that lossless mode is very good
2024-06-03 01:17:00
I have not tested low-effort lossy modular
2024-06-03 01:17:58
But for lossless mode, e=3 is much much much much much faster than e=7 and the difference in compression ratio is worth it
2024-06-03 01:18:06
Much faster decompression too
w
2024-06-03 01:18:16
i dont care about encode time though
Demiurge
2024-06-03 01:18:45
Well it has a huge effect on decompression time.
2024-06-03 01:19:38
e=7 is a bad tradeoff in my opinion. especially since it's much slower to decode.
w
2024-06-03 01:20:04
but why wouldnt i just use webp at that point
Demiurge
2024-06-03 01:21:30
beacuse it's webp, lmao!
w
2024-06-03 01:23:25
i feel bad for the jxl devs who were webp devs
2024-06-03 01:23:37
efforts unappreciated
Demiurge
2024-06-03 01:24:31
Nah, webp lossless is cool, and it's not their fault they were told they have to intentionally limit it and cripple it to match the limitations of vp8 mode, lol.
2024-06-03 01:26:59
great compression attached to a Google-doomed format
2024-06-03 01:27:41
Jyrki's awesome, he's an image coding hero
2024-06-03 01:28:30
Google literally forced him to add arbitrary limitations to webp lossless in order to match the limitations of lossy mode.
2024-06-03 01:31:07
I think the guy in charge of the webp project is the same guy who was the tech lead for On2 technologies and the same guy who is in charge of the Chrome Codec Team who unilaterally decided that there's no ecosystem interest in JXL. Jim Bankowski.
w
2024-06-03 01:31:15
<a:yapping:1227693138215440395>
jonnyawsom3
2024-06-03 01:38:42
I did wonder if group size would have an effect on decode speed
Demiurge
w <a:yapping:1227693138215440395>
2024-06-03 01:40:15
Jeez, you must really dislike me. First you accuse me of not having appreciation for JXL devs that contributed to webp, and now a yapping emoji...
2024-06-03 01:41:22
Pretty sure you can thank Jim for delivering webp to us in it's finished condition while at the same time also removing JXL from Chromium and its derivatives.
JendaLinda
Demiurge It does have more color distortion though. But then again VarDCT mode in libjxl has terrible color distortion imo too
2024-06-03 06:29:29
It does and so does jpegli. The chroma is quatized too much.
2024-06-03 06:42:04
libjpeg-turbo provides okay quality at q=95 and chroma subsampling disabled for non-photo content. This can be losslessly transcoded to JXL. I think that could be an acceptable compromise.
CrushedAsian255
2024-06-03 06:52:23
Wait so what is the problem fundamentally with JPEG XL or random regressions in the encoder?
lonjil
2024-06-03 08:25:09
it's entirely down to the encoder
CrushedAsian255
lonjil it's entirely down to the encoder
2024-06-03 08:32:14
so the color regression is just because of the reference encoder,
Demiurge
2024-06-03 11:15:18
Yes
2024-06-03 12:25:11
It's a regression in the encoder. It's possible to design an encoder that makes different quality tradeoffs.
JendaLinda
2024-06-03 01:45:02
For manga and similar content, I would consider trying other lossy methods like lowering the bit depth under 8 bits or reducing the number of colors, so the encoder would use palette, and use lossless JXL encoding.
2024-06-03 01:46:40
Similar concept like lossy PNG.
jonnyawsom3
2024-06-03 01:47:39
Delta pallete :>
JendaLinda
2024-06-03 01:48:53
I think, for black and white manga, 4 bit grayscale could work as well.
drkt
2024-07-07 03:22:50
If I do ``ffmpeg -i in.jpg out.jxl`` is this a lossless conversion or do I need to specify something? I don't really understand the information I can find on this > ffmpeg version 5.1.4-0+deb12u1
jonnyawsom3
2024-07-07 03:48:21
ffmpeg doesn't support jpeg transcoding, there are a few applications and the reference command line tool that can though
drkt
ffmpeg doesn't support jpeg transcoding, there are a few applications and the reference command line tool that can though
2024-07-07 03:49:55
Okay thank you
CrushedAsian255
2024-07-07 04:23:26
Itโ€™s better to use cjxl most of the time
Traneptora
2024-07-08 07:56:13
yea, that will decode the jpeg to pixels and then encode it with VarDCT distance=1 effort=7
2024-07-08 07:56:24
which is the default for the ffmpeg plugin
lastxtemplar
2024-08-22 10:11:42
hey guys, im new to this whole thing and I dont completely understanding how all this works ๐Ÿ™‚ I have a Mac and I've downloaded jpegxl via brew. now i want to use the jpegli encoder/decoder, how can I add it? the github page on jpegli doesnt help much
Traneptora
2024-08-22 03:25:29
djpegli and cjpegli should be included CLI tools
KKT
2024-08-22 06:09:04
They are actually NOT included in the Homebrew version as seperate binaries. Covered somewhere else, but I can't find itโ€ฆ
2024-08-22 06:16:23
Actually the pull request was closed: https://github.com/Homebrew/homebrew-core/pull/167195 Not sure if the new https://github.com/google/jpegli is buildable on MacOS. Someone here at a higher pay scale may know
Managor
KKT Actually the pull request was closed: https://github.com/Homebrew/homebrew-core/pull/167195 Not sure if the new https://github.com/google/jpegli is buildable on MacOS. Someone here at a higher pay scale may know
2024-08-22 09:02:07
Closed by stalebot
2024-08-22 09:02:17
I hate that so much
Traneptora
lastxtemplar hey guys, im new to this whole thing and I dont completely understanding how all this works ๐Ÿ™‚ I have a Mac and I've downloaded jpegxl via brew. now i want to use the jpegli encoder/decoder, how can I add it? the github page on jpegli doesnt help much
2024-08-22 10:05:38
if you can change the homebrew build options, you need to have `-DJPEGXL_ENABLE_JPEGLI=ON` on the cmake command line
2024-08-22 10:05:44
that will cause it to build jpegli
Managor
2024-08-23 12:42:00
Mediainfo hasn't done anything to support jxl yet
2024-08-23 12:42:06
:(
Meow
KKT Actually the pull request was closed: https://github.com/Homebrew/homebrew-core/pull/167195 Not sure if the new https://github.com/google/jpegli is buildable on MacOS. Someone here at a higher pay scale may know
2024-08-23 08:21:01
Still some difficulties to include Jpegli
jonnyawsom3
2024-09-06 04:58:05
I can't remember how I did it before, but wasn't there a way to render the MA tree as nodes in an SVG file?
lonjil
2024-09-06 05:22:44
jxl_from_tree can do it
jonnyawsom3
2024-09-06 05:30:08
Hmm, that doesn't seem right ```jxl_from_tree Tree.txt Test.jxl Tree.svg 'dot' is not recognized as an internal or external command, operable program or batch file.```
2024-09-06 05:30:30
2024-09-06 05:31:02
Did someone accidentally type `dot` instead of a `.`?
Tirr
2024-09-06 05:34:48
`dot` is a tool in graphviz package
2024-09-06 05:37:51
this is what it looks like when converted (in svg)
2024-09-06 05:38:11
or in png
jonnyawsom3
2024-09-06 05:42:00
Ahh right, it's a specific format for graphs. Had never heard of it before, neat
yoochan
2024-09-06 06:22:12
it is an old tool ! akin to LaTeX
monad
I can't remember how I did it before, but wasn't there a way to render the MA tree as nodes in an SVG file?
2024-09-06 06:46:24
v0.7 `benchmark_xl` can do it with `--debug_image_dir`. can't since then without patching the code
CrushedAsian255
Tirr or in png
2024-09-06 11:53:46
Is the x1 the quantisation multiplier?
Kampidh
2024-09-07 12:07:40
https://discord.com/channels/794206087879852103/794206170445119489/1280280452170649610 Posted the small tool, but only have win64 binaries for now: https://github.com/kampidh/JXL-Frame-Stitcher
lonjil
2024-09-14 12:31:27
the help for cjxl-tiny says: "NOTE: <file in> is a .pfm file in linear SRGB colorspace" I assumed that the pfm files produced by djpegli would be in linear sRGB, however, encoding the resulting pfm file with both cjxl and cjxl-tiny produces very different results, the latter is much brighter, while the former matches the original:
2024-09-14 12:37:13
So, what color space does djpegli output when the output format is pfm, and what'd be the best way to convert it to linear sRGB? Or is the pfm file in fact correct and it's cjxl-tiny that's messing something up?
CrushedAsian255
lonjil So, what color space does djpegli output when the output format is pfm, and what'd be the best way to convert it to linear sRGB? Or is the pfm file in fact correct and it's cjxl-tiny that's messing something up?
2024-09-14 12:55:14
probably gamma corrected sRGB
lonjil
2024-09-14 12:57:47
Does anyone know if there's a list of all the color space tags that djxl accepts?
2024-09-14 01:00:34
`--color_space=RGB_D65_SRG_Per_Lin` appears to have done the trick
2024-09-14 01:01:17
unfortunately, djpegli doesn't accept a color space parameter
Quackdoc
lonjil Does anyone know if there's a list of all the color space tags that djxl accepts?
2024-09-14 01:06:58
I wanted one so bad too lmao
spider-mario
lonjil Does anyone know if there's a list of all the color space tags that djxl accepts?
2024-09-14 01:07:10
for RGB colorspaces, itโ€™s RGB\_<white point>\_<primaries>\_<rendering intent>\_<transfer function>; primaries include SRG (Rec. 709), DCI (P3), 202 (Rec. 2020); transfer function, Lin (linear), SRG (sRGB), g<number> (gamma), PeQ (PQ), HLG, and maybe a few more Iโ€™m not thinking of
2024-09-14 01:07:57
for grayscale, itโ€™s `Gra` instead of `RGB`, and no primaries
2024-09-14 01:08:01
(but still white point)
lonjil
2024-09-14 01:08:10
ty
spider-mario
2024-09-14 01:09:20
basically, โ€œhow would Iย turn the value I want into three characters?โ€, hence the somewhat odd-looking โ€œPeQโ€
2024-09-14 01:09:27
and the truncated โ€œ202โ€
jonnyawsom3
2024-09-15 04:38:25
So what does `--progressive_dc=2` do compared to 1? Seems to make a much more coarse preview than 1 while increasing filesize by over 10% instead of 1%
BabylonAS
2024-09-15 06:25:16
Why am I getting the "Getting pixel data failed" error on trying to convert an animated PNG file?
jonnyawsom3
2024-09-15 06:27:47
Might be related to this https://discord.com/channels/794206087879852103/804324493420920833/1284656561536630885
BabylonAS
2024-09-15 06:31:46
I'm using the 0.10.3 version
2024-09-15 06:40:51
ah, I guess there might be a reason
2024-09-15 06:40:59
Krita's custom sRGB profile
2024-09-15 06:41:34
``` [libjxl @ 000001ce234b77c0] Unknown transfer function, assuming IEC61966-2-1/sRGB. Colors may be wrong. [libjxl @ 000001ce234b77c0] Unknown primaries, assuming BT.709/sRGB. Colors may be wrong. ``` from FFmpeg
RaveSteel
BabylonAS I'm using the 0.10.3 version
2024-09-15 06:42:05
There was a bug encoding APNG to JXL that was fixed with a commit made during 0.10.2 that didn't make it into 0.10.3. Do you have this problem with other APNGs too?
2024-09-15 06:42:36
If yes, try 0.11.0 from the releases section on Github
BabylonAS
2024-09-15 06:43:35
oh, 0.11.0 just got released?
2024-09-15 06:47:27
Looks like it works
jonnyawsom3
2024-09-15 06:47:55
I also don't think ffmpeg can encode animated JXL, can it? Or am I thinking of decoding, or something else...
RaveSteel
I also don't think ffmpeg can encode animated JXL, can it? Or am I thinking of decoding, or something else...
2024-09-15 06:52:18
Only decode
BabylonAS
2024-09-15 07:07:21
Unfortunately the resulting JXL animated file is bigger than the GIF file encoded by Krita beforehand
2024-09-15 07:07:37
by some 90 KiB
2024-09-15 07:08:28
It doesn't seem to have over 256 colors in every frame
monad
So what does `--progressive_dc=2` do compared to 1? Seems to make a much more coarse preview than 1 while increasing filesize by over 10% instead of 1%
2024-09-16 12:36:48
``` --progressive_dc=-1..2 Number of progressive-DC frames, default = -1. -1 = encoder chooses. 0 = disable. 1 = extra 64x64 low-resolution pass. 2 = extra 512x512 and 64x64 passes.```
RaveSteel
BabylonAS Unfortunately the resulting JXL animated file is bigger than the GIF file encoded by Krita beforehand
2024-09-16 12:43:41
You should try e11๐Ÿ˜†
jonnyawsom3
monad ``` --progressive_dc=-1..2 Number of progressive-DC frames, default = -1. -1 = encoder chooses. 0 = disable. 1 = extra 64x64 low-resolution pass. 2 = extra 512x512 and 64x64 passes.```
2024-09-16 06:31:22
Huh... I would've expected a higher number to mean a lower resolution pass, not adding one 8x larger
CrushedAsian255
2024-09-16 06:32:08
It always has an 8x8 pass I think for VarDCT
Huh... I would've expected a higher number to mean a lower resolution pass, not adding one 8x larger
2024-09-16 06:32:16
That would be progressive AC
jonnyawsom3
2024-09-16 06:33:07
DC comes before AC
CrushedAsian255
2024-09-16 06:33:27
I know *
jonnyawsom3
CrushedAsian255 It always has an 8x8 pass I think for VarDCT
2024-09-16 06:34:41
As in 8x8 pixels, or 8x upsample?
CrushedAsian255
2024-09-16 06:35:11
8x8 downscale
2024-09-16 06:35:25
1:8
jonnyawsom3
2024-09-16 06:43:02
Now I'm trying to think if there's any reason for both a 64 and 512 DC in a file, since the 64 allows loading at 1% with a 1% filesize increase. The 512 adds over 10% which makes the same amount of bytes give a lower quality pass
CrushedAsian255
2024-09-16 06:43:20
it can be helpful for massive images
jonnyawsom3
2024-09-16 06:46:59
Maybe if <@206628065147748352> made some videos of regular, DC 1 and DC 2 on a high resolution camera image I might see the difference, but just truncating means a much lower quality for the same size (mine was a 4K image, would test 8 and maybe 16K but memory limitations stop me)
CrushedAsian255
2024-09-16 06:48:19
i guess it would probably be easier to just use Squeeze on the LF frame
Tirr
2024-09-16 07:04:34
higher LF level means you can use VarDCT (which is computationally cheaper than Modular) for midlevel LF frame while keeping Squeeze in high-level LF frame for maximum progressiveness. I think it's only useful for *huge* images, like, in scale of terapixels
2024-09-16 07:05:25
~~do that for OpenTTD screenshots~~
jonnyawsom3
2024-09-16 07:09:20
Have a youtube livestream of an OpenTTD progressive decode running at 1KB/frame
2024-09-16 07:10:01
Get a few days of ad revenue :P
Rega
2024-09-18 04:20:06
Is there any beginner friendly way to convert my png files to lossless jxl?
2024-09-18 04:20:27
I said beginner friendly because I'm not a terminal guy
Oleksii Matiash
Rega Is there any beginner friendly way to convert my png files to lossless jxl?
2024-09-18 04:42:27
https://github.com/kampidh/jxl-batch-converter
Rega
Oleksii Matiash https://github.com/kampidh/jxl-batch-converter
2024-09-18 04:50:35
Perfect
2024-09-18 04:50:41
Tahkns
2024-09-18 04:50:45
Thanks*
HCrikki
2024-09-18 02:31:58
XL converter (github.com/JacobDev1/xl-converter) Just make sure to preserve metadata (iinm metadata is discarded by default). Effort 7 is adequate, you can try higher for small images.
Tumby
2024-09-25 02:48:38
hello, not sure where exactly to ask: Is there a simple way to programmatically check if a JXL was transcoded from a JPEG? i have some scripts set up that allow me to quickly convert any image to jxl or convert jxl to png. i want to upgrade it so that it converts jxl to jpeg if it was originally transcoded from one. all i would need is something that tells me True or False if the jxl was transcoded. jxlinfo.exe outputs a bunch of text, but can i rely on it including the string "JPEG bitstream reconstruction data available"? or is there something more direct I can do
monad
2024-09-25 03:17:40
yes, currently to get an efficient jpeg transcode you would need a jbrd box
Tumby
2024-09-25 03:23:07
should i just run jxlinfo.exe and check for a line that says `box: type: "jbrd" size: [0-9]+, contents size: [0-9]+`?
_wb_
2024-09-25 03:24:11
If and only if jxlinfo says that, djxl will be able to reconstruct a jpeg. You can just grep for "JPEG bitstream reconstruction data available"
Tumby
2024-09-25 03:25:53
searching through/for human-readable text always feels a bit weird since there's no real guarantee that it won't change one day. like changing spelling or formatting
2024-09-25 03:27:31
at least it's just my own personal script, so i'm the only person affected by it breaking after an update
monad
2024-09-25 03:28:17
parse the file then
Laserhosen
Tumby hello, not sure where exactly to ask: Is there a simple way to programmatically check if a JXL was transcoded from a JPEG? i have some scripts set up that allow me to quickly convert any image to jxl or convert jxl to png. i want to upgrade it so that it converts jxl to jpeg if it was originally transcoded from one. all i would need is something that tells me True or False if the jxl was transcoded. jxlinfo.exe outputs a bunch of text, but can i rely on it including the string "JPEG bitstream reconstruction data available"? or is there something more direct I can do
2024-09-25 07:46:56
If a Python script is any use to you: https://gist.github.com/alistair7/3dfbc021db19a9ff237f11a2c3561056 And if not, it shows how to parse the JXL container.
Tumby
Laserhosen If a Python script is any use to you: https://gist.github.com/alistair7/3dfbc021db19a9ff237f11a2c3561056 And if not, it shows how to parse the JXL container.
2024-09-26 12:24:06
nice, thank you!
Prower
2024-10-06 08:58:52
Does anyone know a better image viewer on Windows? ImageGlass is great but it doesn't support JXL/APNG animations and I can't get it to display colors wider than sRGB somehow.
A homosapien
2024-10-06 09:11:26
I use [qimgv](https://github.com/easymodo/qimgv/releases), it's fast and easy to use with animated jxl/apng support. The only thing it doesn't have is color management. ๐Ÿ˜”
2024-10-06 09:11:34
The unfortunate reality is that a lot image viewers are not color managed.
2024-10-06 09:17:50
I find it ironic that the default Windows photo app handles color just fine. ๐Ÿ˜…
Quackdoc
2024-10-06 09:33:01
I really need to make a rust colormanagement crate that oculante can use xD
Prower
A homosapien I use [qimgv](https://github.com/easymodo/qimgv/releases), it's fast and easy to use with animated jxl/apng support. The only thing it doesn't have is color management. ๐Ÿ˜”
2024-10-06 09:40:24
This isn't bad. Simple and effective. I think I'll keep using ImageGlass for most things, It's doing something weird with the colors on my wide gamut photos. This is much better than draging my animations into WaterFox though.
jonnyawsom3
2024-10-06 09:47:36
Hopefully with 24H2 and the new Photos app rolling out, the JXL plugin on the store will turn up soon... Also yay, another Resonite person
Prower
Hopefully with 24H2 and the new Photos app rolling out, the JXL plugin on the store will turn up soon... Also yay, another Resonite person
2024-10-06 09:52:37
I haven't heard anything about MS adding support but maybe they'll just drop it out of nowhere like Apple did.
Hopefully with 24H2 and the new Photos app rolling out, the JXL plugin on the store will turn up soon... Also yay, another Resonite person
2024-10-06 09:53:20
Also yes, figures there would be some overlap there lol. Does Resonite have JXL support? It's their own engine so they possibly could?
username
Prower I haven't heard anything about MS adding support but maybe they'll just drop it out of nowhere like Apple did.
2024-10-06 09:56:41
for quite a while now there has been references to JXL support in the Windows registry and the Windows SDK with said references getting changed around or added onto over time
Prower
username for quite a while now there has been references to JXL support in the Windows registry and the Windows SDK with said references getting changed around or added onto over time
2024-10-06 09:59:13
Oh nice! I didn't know that. MS has been getting better with support recently, I know they added 7z pretty recently
jonnyawsom3
2024-10-06 10:02:19
Also this https://x.com/thiojoe/status/1841268514406928891
username
Prower Oh nice! I didn't know that. MS has been getting better with support recently, I know they added 7z pretty recently
2024-10-06 10:04:53
speaking of, apparently the extended archive support in Windows 11 is based on [libarchive](https://www.libarchive.org/) which sadly has pretty poor support for RAR as when testing against Windows 11 the first thing I did was make perfectly valid RAR archives that file explorer refused to open or would crash on which is a bit of a shame.
2024-10-06 10:05:38
it's cool that they are trying at least
jonnyawsom3
Prower Also yes, figures there would be some overlap there lol. Does Resonite have JXL support? It's their own engine so they possibly could?
2024-10-06 10:06:07
The Engine is deeply engrained with FreeImage... A 13 year old image library that they had to fork to fix the WebP security issues ages ago. Someone else asked for AVIF support, and shortly after one of the new devs said "He likes the format" so they got it working in the span of a week, but I don't think it's actually been merged https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1562
2024-10-06 10:09:30
I think they also misunderstand the WebP settings, so they have 'quality' 100 lossless files with method 0 because 6 was too slow. Wanted to try an edited version with different settings but I can't recompile myself https://github.com/Yellow-Dog-Man/FreeImage/pull/9
2024-10-06 10:11:30
Oh, I should point out the game uses WebP internally for photos and image storage. With Froox (Head dev) saying he wants to use AVIF in future because it's newer... I'd spend a week explaining 'lossless' AVIF but I already bullied him about BC7 compression and feel bad xD
Prower
2024-10-06 10:15:57
Would JXL be a good replacement for all 3 of those formats? As I understand it AVIF might be better on the far low end BC7 is game engine optimized so I'm not sure how JXL would fare for framerate.
Quackdoc
2024-10-06 10:16:54
AVIF would only be better in the range that you would likely see visible compression artifacts so IMO it has no place near a game engine
2024-10-06 10:17:12
well quality wise
2024-10-06 10:18:47
when it comes to decoding, dav1d is really good at what it does on little threads, and can often perform better then jxl when it comes strictly to decoding images.
HCrikki
2024-10-06 10:22:23
games and apps can ship a jxl library just fine and do not depend on anyone else's adoption
_wb_
2024-10-06 10:24:27
Also speed-wise, avif performs best for low-quality. At higher quality it gets slower for both encode and decode, while for 8-bit 420 at low quality it is faster. In libjxl we don't currently have much specialized code paths for lower precision, there's a compile option for lower precision that has some specializations but mostly it's all just float32.
HCrikki
2024-10-06 10:24:32
for 2d-heavy games, lossless webp does the trick since it can get more agressive filesize gains, jxl is better mostly since it has comparatively fewer limitations and higher capabilities like hdr and quicker decode (for slow media like sd cards)
jonnyawsom3
Prower Would JXL be a good replacement for all 3 of those formats? As I understand it AVIF might be better on the far low end BC7 is game engine optimized so I'm not sure how JXL would fare for framerate.
2024-10-06 10:26:24
AVIF is awful at lossless, so JXL could be on par with WebP at 10x the speed or a smaller file at the same speed (And much lower memory usage, which the game really needs) For lossy, AVIF could work for the world previews, but it's even slower and more expensive than WebP so there could be a lot of delay In the end all images have to go to the GPU, most of the time either that's BC1 or BC7, with 7 being higher quality at double the memory usage and slower compression. I made another issue asking for GPU BC7 encoding to make it almost instant, since I'd prefer a 2 second lockup to 2 minutes of stuttering when handing very large textures
HCrikki games and apps can ship a jxl library just fine and do not depend on anyone else's adoption
2024-10-06 10:28:21
Issue is the game is built on .NET, and uses FreeImage for all image handing currently. So it's more likely to change image library entirely if adding new formats, otherwise the library needs .NET bindings which libjxl doesn't have
2024-10-06 10:30:45
I should also add context, Resonite is similar to VRChat but the content is edited during runtime. So assets are constantly streamed from CDNs and between users P2P, usually converting to BC formats client side before upload to the cloud, where more variants are generated for ASTC, ect
2024-10-06 10:32:53
The original filesize counts towards your storage quota, so using optimized images lowers the storage hit while the GPU variants are 'free'
Prower
2024-10-06 10:44:46
Wait so if textures are just converted to BC what would be the benefit of using alternate codecs? Is it just the file size on your personal cloud storage or would there be some engine upside to using it?
jonnyawsom3
2024-10-06 10:53:45
Really it depends on how long they're willing to spend on it. They could do progressive loading with the 1:8 sizes you get for free, faster screenshots/saving, lower memory usage, less CPU usage, HDR textures for things like skyboxes, JPEG transcoding to lower storage costs and CDN fees for free
2024-10-06 10:54:06
Probably more but I'm crawling into bed
username
I think they also misunderstand the WebP settings, so they have 'quality' 100 lossless files with method 0 because 6 was too slow. Wanted to try an edited version with different settings but I can't recompile myself https://github.com/Yellow-Dog-Man/FreeImage/pull/9
2024-10-06 11:48:37
yeah I'm looking closer at it and for lossless they are setting "quality" to 100 which well only affects compression effort because both "quality" and "method" affect only speed in lossless which isn't very intuitive
2024-10-06 11:49:37
so "method" being set to `6` was probably activating the lossless cruncher since it's activated only when "method" and "quality" are both set to max
2024-10-07 02:15:35
https://github.com/Yellow-Dog-Man/FreeImage/pull/17
jonnyawsom3
2024-10-07 06:29:51
Ah, you made a PR already. I did months ago but it was changing the threads setting instead since they lowered it from 6 to 1, then learned it doesn't use more than 2 on crunching anyway. Actually, I really don't know why I didn't make a PR before. I already did the tests of quality/method combinations to measure speed:density ratios
2024-10-07 06:33:34
And apparently it was an issue not a PR I made... Guess I was still nervous about touching any code back then
2024-10-07 06:38:02
Seems like Froox deleted our messages on Telegram so I guess I'll never know why I didn't. Hopefully this goes through this time
username https://github.com/Yellow-Dog-Man/FreeImage/pull/17
2024-10-07 11:27:35
Remade my benchmarks and left a comment. Method 1 Quality 20 for Lossless, Method 5 and enabling SharpYUV for lossy since the game tends to have vibrant colors that need it
username
Remade my benchmarks and left a comment. Method 1 Quality 20 for Lossless, Method 5 and enabling SharpYUV for lossy since the game tends to have vibrant colors that need it
2024-10-07 03:11:50
moving to https://discord.com/channels/794206087879852103/805176455658733570: https://discord.com/channels/794206087879852103/805176455658733570/1292866913210339430
CrushedAsian255
2024-10-21 11:43:29
```RGB, D65, Rec.2100 primaries, HLG transfer function```
Traneptora
2024-10-26 01:51:59
does `ssimulacra2` report 100.0 upon error?
2024-10-26 01:52:12
I have a PNG and a corresponding JXL file that ssimulacra2 is reporting 100.0000 as the score
2024-10-26 01:52:14
(they aren't the same)
2024-10-26 01:53:04
``` $ ssimulacra2 Elia.png Elia-h2.jxl 100.00000000 $ djxl Elia-h2.jxl Elia-h2.png JPEG XL decoder v0.12.0 c6355600 [AVX2] Decoded to pixels. 3600 x 2500, 13.964 MP/s [13.96, 13.96], , 1 reps, 8 threads. $ ssimulacra2 Elia.png Elia-h2.png -9.11341708 ```
2024-10-26 01:53:59
upon djxling the file, the score is -9
2024-10-26 01:55:47
the file itself is a hydrium encode that isn't corrupt but is bugged, so the actual score should be in the 70 range probably
A homosapien
2024-10-26 02:59:58
What does butteraugli say?
_wb_
2024-10-26 08:06:14
Huh strange
2024-10-26 08:08:37
Can you open an issue about this? The difference between a jxl and a decoded PNG should not be large, question is where the bug is.
Traneptora
_wb_ Can you open an issue about this? The difference between a jxl and a decoded PNG should not be large, question is where the bug is.
2024-10-26 01:30:23
in this case the difference is between the original PNG and the encoded JXL should be in the less than 100.00 range but it's actually 100.00
2024-10-26 01:31:26
decoding the JXL to PNG first and then running ssimulacra2 should produce identical results
A homosapien What does butteraugli say?
2024-10-26 01:34:58
`butteraugli_main` also produces wildly different results for the jxl file and the corresponding decoded png
2024-10-26 01:35:10
are they only decoding the first Frame?
2024-10-26 01:35:13
is that the issue?
2024-10-26 01:36:06
it's a Hydrium encode so multiple `Frame`s are present
2024-10-26 01:36:18
``` $ djxl Elia-h2.jxl Elia-h2.png JPEG XL decoder v0.12.0 c6355600 [AVX2] Decoded to pixels. 3600 x 2500, 13.755 MP/s [13.76, 13.76], , 1 reps, 8 threads. $ butteraugli_main Elia.png Elia-h2.jxl 273777.6250000000 3-norm: 48609.677564 $ butteraugli_main Elia.png Elia-h2.png 137.6842346191 3-norm: 27.868563 ```
2024-10-26 01:37:31
most of the frames are Skip Progressive. the only one that is Regular is the last frame
2024-10-26 01:40:25
that's probably not the issue cause it's also happening for a one-frame encode
2024-10-26 01:40:26
interesting
_wb_ Can you open an issue about this? The difference between a jxl and a decoded PNG should not be large, question is where the bug is.
2024-10-26 01:48:19
let me see if I can reproduce it with a smaller file
2024-10-26 01:48:25
one that I'm permitted to share as well
2024-10-26 02:15:39
https://github.com/libjxl/libjxl/issues/3909
_wb_
2024-10-26 02:31:56
Must be something weird going on in how they load those jxl files
Traneptora
2024-10-26 02:32:07
I think it's cause the JXL file is overflowing
_wb_
2024-10-26 02:32:15
Oh
Traneptora
2024-10-26 02:32:23
which is totally legal
_wb_
2024-10-26 02:32:24
And the PNG is clamped
Traneptora
2024-10-26 02:32:32
but it still shouldn't produce 100.000 as a score though
_wb_
2024-10-26 02:33:04
No that is weird, shouldn't happen unless the images are identical
Traneptora
_wb_ No that is weird, shouldn't happen unless the images are identical
2024-10-26 03:08:18
in other news I did fix the hydrium bug that caused the JXL files to overflow. turns out the issue was with partial blocks
2024-10-26 03:08:34
I allocated a buffer for them but didn't zero out the buffer so they were filled with garbage
2024-10-26 03:08:49
which in theory shouldn't matter but when they're filled with random data that isn't zero it can mess up the DCT roundoff
2024-10-26 03:09:05
by zeroing out the padding before forward DCT everything is working now
2024-10-26 03:09:54
still fixing bugs in hydrium before I start working on speed and options
2024-10-26 04:08:50
I did do some profiling. right now `hydrium` is fairly comparable to `cjxl -d 1 -e 4` on a single thread, in both speed and quality. it loses in density but wins dramatically in RAM usage
2024-10-26 04:11:58
memusage reports a max mem usage of about 300 MB for this test 3600x2500 file using cjxl, and hydrium caps out at around 100 MB for the `--one-frame` mode and the lower tile sizes can drop it as low as 6 MB
2024-10-26 04:12:22
density for this file is about 1.5M for cjxl and about 2M for hydrium, so it's got a ways to go in density
2024-10-26 04:13:25
that's 6 MB including libspng, it's ~2.5M from libhydrium itself and 3.5M from the png decoder
2024-10-26 04:13:54
this is also with no intrinsics and no simd other than compiler autovectorization
2024-10-26 04:14:08
I also don't rely on any instructions like fma that the compiler can't generate for me
2024-10-26 04:14:44
(i.e. `a * b + c` will be optimized into fma by gcc provided you pass `-ffp-contract=fast`
Dejay
2024-11-03 04:29:43
Is there any "fire and forget" tool to denoise and/or remove artifacts from jpg so that recompression with jxl d=1 would be more efficient?
2024-11-03 04:29:45
I've heard waifu or Nunif but I haven't tested it yet
2024-11-03 04:30:05
Or do you always have to carefully check each image if you lost too much detail?
Demiurge
Dejay Is there any "fire and forget" tool to denoise and/or remove artifacts from jpg so that recompression with jxl d=1 would be more efficient?
2024-11-03 04:35:19
Don't use d=1
2024-11-03 04:35:34
Use d=0 j=1
2024-11-03 04:37:23
The current lossy encoder is not that efficient and it's not guaranteed to be smaller than the input JPEG but lossless mode works perfect.
2024-11-03 04:39:10
Maybe in the future lossy mode will also be guaranteed smaller but right now it isn't efficient and just encodes the jpeg as if it were a normal pixmap
Dejay
2024-11-03 04:39:40
Yeah. But on some of the webtoons even d=2 doesn't seem to make a visual difference, so I'm wondering how much I could push it. Basically my idea would be, if you could "reconstruct the original uncompressed version" using some AI magic, how much could you recompress
CrushedAsian255
Demiurge Maybe in the future lossy mode will also be guaranteed smaller but right now it isn't efficient and just encodes the jpeg as if it were a normal pixmap
2024-11-03 04:39:44
It could possibly do something where it still uses the JPEG coefficients but does some adaptive extra quantisation or something
Demiurge
2024-11-03 04:39:53
Exactly
CrushedAsian255
Dejay Yeah. But on some of the webtoons even d=2 doesn't seem to make a visual difference, so I'm wondering how much I could push it. Basically my idea would be, if you could "reconstruct the original uncompressed version" using some AI magic, how much could you recompress
2024-11-03 04:40:23
Like go from Low quality jpeg -[AI?]-> High quality -> pixels -> JXL?
Dejay
2024-11-03 04:40:34
Yeah kinda
CrushedAsian255
2024-11-03 04:41:03
Only thing is I donโ€™t think you can merge coefficients like with VarDCT
2024-11-03 04:41:17
It would probably be more akin to e3 / e4
Demiurge
2024-11-03 04:42:04
But current libjxl doesn't do that. Hopefully someone modifies it to re-use and requantize the existing dct coefficients instead of naively starting from scratch
CrushedAsian255
2024-11-03 04:42:54
Although most of the time you probably want lossless transcode
2024-11-03 04:44:24
JXLโ€™s lossless mode is actually pretty good at photographic
Demiurge
CrushedAsian255 Only thing is I donโ€™t think you can merge coefficients like with VarDCT
2024-11-03 04:44:54
I don't see why you wouldn't be able to merge blocks.
Dejay
CrushedAsian255 Like go from Low quality jpeg -[AI?]-> High quality -> pixels -> JXL?
2024-11-03 04:45:01
I mean if you had the originals, a more efficient lossy jxl encoder should produce much better results than jpg trans-coding. So I'm wondering if with AI magic you could achieve something like that
CrushedAsian255
Demiurge I don't see why you wouldn't be able to merge blocks.
2024-11-03 04:45:19
Not sure if dct coefficients can just be merged as it is applied to the entire block
Demiurge
2024-11-03 04:45:41
We're talking about jpeg here. Every block is basically the same quantization factors
2024-11-03 04:46:05
So I think merging them would be trivial?
CrushedAsian255
2024-11-03 04:46:23
This is frequency domain though there is no concept of location
Demiurge
2024-11-03 04:46:47
Hmm, good point.
CrushedAsian255
2024-11-03 04:46:57
I canโ€™t think of any way to take 2 sets of 8x8 coefficients and merge them into 8x16 without any IDCT
Demiurge So I think merging them would be trivial?
2024-11-03 04:47:12
If we were is pixel domain yes
2024-11-03 04:47:42
Like for Modular it would be relatively trivial (just some tree reorganisation) as that runs in pixel domain
Dejay
2024-11-03 04:49:17
I wonder if you could train an AI model to work on the jpg 8x8 coefficients to restore the original image
Demiurge
2024-11-03 04:49:48
You could merge adjacent blocks only if they were similar frequency to begin with
CrushedAsian255
Dejay I wonder if you could train an AI model to work on the jpg 8x8 coefficients to restore the original image
2024-11-03 04:49:58
As in given the quantisation matrix and the dct, output another set of dct coefficients without IDCT?
Dejay
CrushedAsian255 As in given the quantisation matrix and the dct, output another set of dct coefficients without IDCT?
2024-11-03 04:50:41
I don't quite understand how dct works, but I mean the original pixel data used for jpg compression
2024-11-03 04:51:06
Like you'd train an AI model on doing that
CrushedAsian255
2024-11-03 04:51:23
DCT is converting pixel domain to frequency domain through a new domain name and then converting it to a different type
2024-11-03 04:51:37
Not great at explaining
Dejay
2024-11-03 04:51:53
That's fine, I'm not great at math ๐Ÿ˜‰
Demiurge
2024-11-03 04:52:22
It basically produces a spectrogram
CrushedAsian255
2024-11-03 04:53:02
I wonder if there are any lossy image compression that doesnโ€™t ever go to frequency domain through DCT / FFT / Wavelets
Dejay
2024-11-03 04:53:04
I have a nebulous understanding of this like ripples in a pot of water to describe the image, but I don't truly understand it
Demiurge
2024-11-03 04:53:26
So instead of pixels it's frequency
CrushedAsian255
2024-11-03 04:53:30
I guess modular lossy JXL with squeeze turned off?
Demiurge
2024-11-03 04:54:13
I don't think squeeze is frequency domain...
2024-11-03 04:54:40
Unless you really have a broad definition of it
2024-11-03 04:55:02
It's just resizing the image basically.
Dejay
2024-11-03 04:55:27
Anyway, if you had an AI tool to "restore" the original pixels from a jpg, and then recompress using jxl, it would be interesting to see a benchmark
2024-11-03 04:55:50
Like test it with butteraugli distance to original uncompressed image
Demiurge
2024-11-03 04:56:25
Storing multiple smaller copies of the image that can be reversibly reconstructed into the larger one
Dejay
2024-11-03 04:56:46
Since the jpg then would already have a butteraugli distance to the original pixels, a jxl recompression (of an AI restored version) with say d=2 might be able to beat jpg
Demiurge
Dejay Like test it with butteraugli distance to original uncompressed image
2024-11-03 04:57:23
But if you have the original uncompressed image you shouldn't use an AI to guess... ;)
Dejay
Demiurge But if you have the original uncompressed image you shouldn't use an AI to guess... ;)
2024-11-03 04:57:59
Well that would be just for benchmarking the result, normally you wouldn't have the original of course
2024-11-03 04:58:16
I'm just trying to crunch shitty webtoons here ๐Ÿ˜„
Demiurge
2024-11-03 04:58:43
You sure you don't want lossless? It's the most future proof...
2024-11-03 04:59:16
Lossy libjxl 0.10 is nothing to write home to your mom about yet
Dejay
2024-11-03 04:59:35
Well yeah that is the sensible solution of course
Demiurge
2024-11-03 04:59:40
It has a lot of room to improve still
Dejay
Dejay I've heard waifu or Nunif but I haven't tested it yet
2024-11-03 05:25:26
To answer my own question Real-ESRGAN is easy to use and seems pretty awesome
_wb_
2024-11-03 08:38:49
Squeeze is also a frequency transform but the way it is used by default only applies the recursive step to the LF part, so most of the HF residuals are kind of still more or less in the pixel domain.
CrushedAsian255
_wb_ Squeeze is also a frequency transform but the way it is used by default only applies the recursive step to the LF part, so most of the HF residuals are kind of still more or less in the pixel domain.
2024-11-03 08:58:52
how is there a LF/HF split with Modular?
_wb_
2024-11-03 09:03:21
If there is no squeeze, it's just all HF. With squeeze, things get divided over sections in such a way that the 1:8 data is available together with the VarDCT LF, and in case of more progressive passes (for 1:4 and 1:2), the modular data is in the corresponding sections. So in principle you can do VarDCT with alpha and whatever other extra channels and have it fully progressive.
Demiurge
2024-11-03 09:03:50
Because when you resize an image and make a smaller version of it youโ€™re probably doing a lowpass
CrushedAsian255
_wb_ If there is no squeeze, it's just all HF. With squeeze, things get divided over sections in such a way that the 1:8 data is available together with the VarDCT LF, and in case of more progressive passes (for 1:4 and 1:2), the modular data is in the corresponding sections. So in principle you can do VarDCT with alpha and whatever other extra channels and have it fully progressive.
2024-11-03 09:05:40
i thought modular was trees?
2024-11-03 09:05:48
how do you cut a tree into parts?
monad
2024-11-03 09:12:25
i expect you squeeze first, then (optionally) predict the squeeze-transformed data with a tree
CrushedAsian255
2024-11-03 09:13:06
so there are 2 trees??
2024-11-03 09:13:17
JPEG XL: The Forest Codec
Dejay
2024-11-03 09:14:46
So regarding my previous idea, playing around with real-esregan it seems possible. I 4x upscaled a 2k comic book (800x1131) then downscaling to fit into 4k / 2160p and using distance 8 you get a smaller file that appears to look sharper and better
monad
Dejay So regarding my previous idea, playing around with real-esregan it seems possible. I 4x upscaled a 2k comic book (800x1131) then downscaling to fit into 4k / 2160p and using distance 8 you get a smaller file that appears to look sharper and better
2024-11-03 09:17:12
there are models for 1x jpeg artifact reduction. but none of these models are mathematically reliable, inventing information
_wb_
CrushedAsian255 how do you cut a tree into parts?
2024-11-03 09:19:37
There can be a global tree but you can also have a local tree per modular bitstream. In any case, the section id, group id and channel id are all properties the tree decision nodes can use, so whether you do things as one big global tree or several local trees doesn't make that much of a difference, the expressivity is the same.
Dejay
2024-11-03 09:19:44
Well as long as they are good at inventing ๐Ÿ˜‰
monad
2024-11-03 09:22:26
with comic-like art, possibly <https://github.com/victorvde/jpeg2png> can offer you a mathematically sound result, but you may have to experiment with iterations so you don't oversmooth
Dejay
2024-11-03 09:24:06
Well with realesregan the anime model actually looks worse, removing too much detail and inventing too much. I imagine this depends if you "overdo it", like use a too low size input
2024-11-03 09:25:12
Theoretically, compression-wise it's better to compress the smaller input and then use a GAN as a "decompression" algorithm. I imagine that is how the next generation of compression algorithms work. Learning how (e.g.) faces are supposed to look and then using that to compress stuff
jonnyawsom3
2024-11-03 12:42:04
I was wondering when someone would bring up jpeg2png and https://github.com/ilyakurdyukov/jpeg-quantsmooth
2024-11-03 12:43:19
Thanks google...
2024-11-03 12:44:28
It attempts to 'guess' the quantized values and outputs a 'quality 100' jpeg from the input
TheBigBadBoy - ๐™ธ๐š›
I was wondering when someone would bring up jpeg2png and https://github.com/ilyakurdyukov/jpeg-quantsmooth
2024-11-03 01:19:55
tbh I had better results with some ai models, e.g. waifu2x
jonnyawsom3
2024-11-03 01:24:44
Yeah, it's just a non 'black box' AI solution
TheBigBadBoy - ๐™ธ๐š›
2024-11-03 01:35:47
true but it was too smooth sometimes
veluca
2024-11-03 02:54:26
making a JPEG decoder that tries to maximize realism (i.e. matches the distribution of natural images, a la stable diffusion) while still being constrained to produce spec-conformant pixels should not take *too* long for people that know how to do those things
jonnyawsom3
2024-11-04 12:12:49
The issue is finding someone who's both an AI expert and a JPEG expert at the same time, which is something I see a lot. Just throwing a neural net at the problem instead of using it for the actually tricky parts and within a range that's already possible
Traneptora
Dejay Is there any "fire and forget" tool to denoise and/or remove artifacts from jpg so that recompression with jxl d=1 would be more efficient?
2024-11-07 05:42:04
I use waifu2x to remove jpeg artifacts
Dejay
Traneptora I use waifu2x to remove jpeg artifacts
2024-11-07 06:21:19
Yeah I still have to try that out, but don't have enough space for the installation Real-Esregan only needs 50mb and is quite interesting, but does a lot more than just remove artifacts. I think it's stable diffusion based so changes and reinterprets the image much more
Traneptora
2024-11-07 06:22:17
I use waifu2x-ncnn-vulkan
Dejay
Traneptora I use waifu2x-ncnn-vulkan
2024-11-07 06:23:02
Ah thanks, will give that a try
Traneptora
2024-11-07 06:23:22
it's a package on arch, maybe in the AUR
2024-11-07 06:23:25
dunno on windows if it's a thing
Dejay
Traneptora dunno on windows if it's a thing
2024-11-07 06:31:53
Yeah works same as real-esregan, but less "aggressive"
TheBigBadBoy - ๐™ธ๐š›
2024-11-07 06:37:50
`waifu2x-ncnn-vulkan` is only 35MB there is also 1x_JPEG_60-80.pth from BlueAmulet which is 64MB, better than waifu2x in most of my tests imo
2024-11-07 06:38:28
well I guess there are some dependencies taking space, but idk how much
jonnyawsom3
2024-11-07 06:41:51
Right now my waifu is using 1.2GB, but I have an oooold version from 2019
Dejay
2024-11-07 06:41:58
Interesting, but 2x upscale is quite nice too.
2024-11-07 06:42:00
So ncnn and pytorch are kinda like runtime environments for these models?
yoochan
Dejay Yeah I still have to try that out, but don't have enough space for the installation Real-Esregan only needs 50mb and is quite interesting, but does a lot more than just remove artifacts. I think it's stable diffusion based so changes and reinterprets the image much more
2024-11-07 07:20:37
https://github.com/victorvde/jpeg2png is a brute force denoiser for jpg (no neural network) which works very well for drawings but is a bit aggressive on photos. Dev stalled 9 years ago... There is another one in the same category. but I can't remember the name
2024-11-07 07:25:30
The other one is https://github.com/google/knusperli ... I wonder why I forgot the name... The author is a little known swiss
Dejay
2024-11-07 07:27:28
Google seems to have successfully invaded Switzerland haha
2024-11-07 07:31:46
So many AI models for super-resolution! I'll need an AI model to determine which AI model is best suited for the images lol
yoochan
2024-11-07 07:32:38
you want some more reasons to hesitate ? https://github.com/wenbihan/reproducible-image-denoising-state-of-the-art
TheBigBadBoy - ๐™ธ๐š›
Dejay So ncnn and pytorch are kinda like runtime environments for these models?
2024-11-07 07:38:11
for pytorch models I simply use chaiNNer, easy UI for deps and workflow and just checked, ncnn is only 11MB so `waifu2x-ncnn-vulkan` is really small size
Dejay
TheBigBadBoy - ๐™ธ๐š› for pytorch models I simply use chaiNNer, easy UI for deps and workflow and just checked, ncnn is only 11MB so `waifu2x-ncnn-vulkan` is really small size
2024-11-07 07:40:01
Thanks, I've been lazy and not reading up on how all the AI stuff works
2024-11-07 07:40:27
I just need to upgrade my PC for those big SDKs
2024-11-07 07:40:59
There are even models for halftone removal!
w
2024-11-08 12:31:07
just pick one from openmodeldb
Dejay
2024-11-08 09:59:48
Yeah chaiNNer is almost perfect for my use case if it could save JXL. And load and save images in zip files / comic book archive. But should be easy to extend
2024-11-08 10:01:48
I'm going to call it chainNo from now on. Chaino unclogs and cleans your jpegs!
2024-11-08 10:10:15
What would be cool for chainner would be if you could remove the noise and then generate photon noise parameters or a noise LUT, and then plug than into the save image for jxl and avif again
2024-11-08 10:11:34
Does libjxl have something like that? I know svt has
jonnyawsom3
2024-11-08 10:14:52
It has adaptive noise, but I think it's broken in cjxl currently
Dejay
2024-11-08 10:20:11
Basically subtract two images, original and cleaned, and then generate a jxl noise lut. But I'm basically just spewing buzzwords here, I only have a vague understanding how this works. A lookup table depending on luminance of pixel and a corresponding frequency for the generate noise? That would be like a small 2D image
paperboyo
Dejay Does libjxl have something like that? I know svt has
2024-11-08 11:00:31
> I know svt has This sounds cool. Is there anywhere I could read up on that in detail?
Dejay
paperboyo > I know svt has This sounds cool. Is there anywhere I could read up on that in detail?
2024-11-08 11:09:59
Hmm, it was aom enc not svt, and I think it was here: <https://aomedia.googlesource.com/aom/+/refs/heads/main/examples/noise_model.c>
2024-11-08 11:11:56
SVT also has something like, but I don't quite know what this does. I only scrubbed through that source: <https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/test/noise_model_test.cc?ref_type=heads> There is another example code file too
jonnyawsom3
2024-11-12 01:32:25
Thought I'd try and use benchmark_xl to get VarDCT visualisations again, but seems this still isn't fixed https://github.com/libjxl/libjxl/issues/2287
2024-11-12 01:34:03
```benchmark_xl --debug_image_dir="C:\Users\jonat\Downloads" --inner_threads=8 --input="C:\Users\jonat\Pictures\Screenshots\Screenshot (825).png" benchmark_xl v0.12.0 bc12b30 [AVX2,SSE2] 16 total threads, 1 tasks, 0 threads, 8 inner threads Error in jxl codec There were error(s) in the benchmark. Allocation count: 0, total: 0.000000E+00 (max bytes in use: 0.000000E+00)``` ```benchmark_xl --inner_threads=8 --input="C:\Users\jonat\Pictures\Screenshots\Screenshot (825).png" benchmark_xl v0.12.0 bc12b30 [AVX2,SSE2] 16 total threads, 1 tasks, 0 threads, 8 inner threads (Results) Allocation count: 3035, total: 6.800554E+08 (max bytes in use: 1.676737E+08)```
HUK
Dejay Yeah I still have to try that out, but don't have enough space for the installation Real-Esregan only needs 50mb and is quite interesting, but does a lot more than just remove artifacts. I think it's stable diffusion based so changes and reinterprets the image much more
2024-11-12 06:39:17
FBCNN maybe
Traneptora I use waifu2x-ncnn-vulkan
2024-11-12 06:39:31
why would you do this to yourself
TheBigBadBoy - ๐™ธ๐š› `waifu2x-ncnn-vulkan` is only 35MB there is also 1x_JPEG_60-80.pth from BlueAmulet which is 64MB, better than waifu2x in most of my tests imo
2024-11-12 06:40:08
Sayajin dejpeg and FBCNN should be better than blueamulets
CrushedAsian255
2024-11-12 06:44:00
I found a python script that decodes the gainmap and converts iPhone HEIC HDR files to PNG, and modified it to convert to PFM, so it can can be more easily used to encode to JPEG XL. https://github.com/CrushedAsian255/apple-hdr-heic
Dejay
HUK FBCNN maybe
2024-11-13 03:25:39
Thanks all for all these links, all these codes are super interesting. For my purposes, mild upscaling (~ 1.6 to 2.0x) and mild jpeg cleanup for sprucing up medium quality manga or manhwa, those stable diffusion AI models seem to be best.
TheBigBadBoy - ๐™ธ๐š›
2024-11-13 04:23:43
yeah but how do you get a working FBCNN executable ? nothing in the AUR, they don't have any release, ...
Dejay
TheBigBadBoy - ๐™ธ๐š› yeah but how do you get a working FBCNN executable ? nothing in the AUR, they don't have any release, ...
2024-11-13 04:40:18
There is a .pth model you can download and use but I haven't set that up yet. They also mention <https://huggingface.co/spaces/danielsapit/JPEG_Artifacts_Removal> which doesn't work. If you search for "JPEG_Artifacts_Removal" there are forks that also don't work.
2024-11-13 04:40:39
But since I don't understand this stuff that is to be expected of my efforts ๐Ÿ˜„
HUK
TheBigBadBoy - ๐™ธ๐š› yeah but how do you get a working FBCNN executable ? nothing in the AUR, they don't have any release, ...
2024-11-13 06:03:37
use pth in chainner or git clone and use conda
TheBigBadBoy - ๐™ธ๐š›
2024-11-13 10:37:45
oh righr they hace a release I don't why I didn't see it lmao, and I already use chaiNNer with other stuff
jonnyawsom3
2024-11-14 09:09:20
Oh hey, the MB/s is working again `5120 x 3840, geomean: 127.239 MP/s [115.22, 133.55], geomean: 24.672 MB/s [22.34, 25.90], 10 reps, 16 threads.`
bonnibel
2024-12-04 04:33:45
I'm trying to use ffmpeg libplacebo to create linear grayscale float jxls, but for some reason it's coming out way too light ``` # Linear 16-bit grayscale comes out fine fmpeg -i in.png -init_hw_device vulkan -vf "libplacebo=saturation=0:color_trc=linear:format=gray16" -distance 0.0 out.jxl # Linear float32 grayscale comes out way too light fmpeg -i in.png -init_hw_device vulkan -vf "libplacebo=saturation=0:color_trc=linear:format=grayf32" -distance 0.0 out.jxl ``` Anyone know what I'm doing wrong here? jxlinfo says everything's correctly tagged, so clearly something is going wrong somewhere in the pipeline
A homosapien
2024-12-05 12:44:55
can you show what jxlinfo says?
Traneptora
bonnibel I'm trying to use ffmpeg libplacebo to create linear grayscale float jxls, but for some reason it's coming out way too light ``` # Linear 16-bit grayscale comes out fine fmpeg -i in.png -init_hw_device vulkan -vf "libplacebo=saturation=0:color_trc=linear:format=gray16" -distance 0.0 out.jxl # Linear float32 grayscale comes out way too light fmpeg -i in.png -init_hw_device vulkan -vf "libplacebo=saturation=0:color_trc=linear:format=grayf32" -distance 0.0 out.jxl ``` Anyone know what I'm doing wrong here? jxlinfo says everything's correctly tagged, so clearly something is going wrong somewhere in the pipeline
2024-12-05 01:15:48
`saturation=0` is the problem
bonnibel
A homosapien can you show what jxlinfo says?
2024-12-05 01:17:00
``` jxlinfo out.jxl JPEG XL image, 256x256, lossy, 32-bit float (8 exponent bits) Grayscale Color space: Grayscale, D65, Linear transfer function, rendering intent: Relative ```
2024-12-05 01:17:37
very hacky but this works: ``` fmpeg -i in.png -init_hw_device vulkan -vf "libplacebo=saturation=0:color_trc=linear:format=gbrpf32,extractplanes=r" -distance 0.0 out.jxl ```
Traneptora
2024-12-05 01:17:54
don't do that
2024-12-05 01:19:01
don't do saturation=0
2024-12-05 01:19:05
there's no reason to do that
2024-12-05 01:19:18
but you are correct that grayf32 is coming out too light
bonnibel
2024-12-05 01:24:11
ah yeah I only put that saturation=0 in there for testing, 'cause I wanted to make sure the problem wasn't that it was just grabbing eg the red channel rather than mixing them
Traneptora
2024-12-05 01:24:29
if you want you can force the matrix to be e.g. bt709
2024-12-05 01:24:34
and then it'll just take the Y channel
bonnibel
2024-12-05 01:36:46
as in`libplacebo=colorspace=bt709:color_trc=linear:format=grayf32`? still comes out too light...
Traneptora
bonnibel ah yeah I only put that saturation=0 in there for testing, 'cause I wanted to make sure the problem wasn't that it was just grabbing eg the red channel rather than mixing them
2024-12-05 01:38:17
I have determined it's a libjxl bug, and not a bug with libplacebo or ffmpeg
2024-12-05 01:38:26
how to test:
2024-12-05 01:39:11
step 1: george.pfm
2024-12-05 01:39:47
2024-12-05 01:40:38
step 2: `convert george.pfm george.png`
2024-12-05 01:42:06
`umbrielpng --cicp-prim=bt709 --cicp-trc=linear --fix-in-place george-16.png`
2024-12-05 01:42:10
(this tags it as linear)
2024-12-05 01:42:41
step 3:
2024-12-05 01:42:43
`cjxl -d 0 -x color_space=Gra_D65_Rel_Lin_SRG george.pfm out1.jxl`
2024-12-05 01:42:49
`cjxl -d 0 george-16.png out2.jxl`
2024-12-05 01:43:23
wait, hm
2024-12-05 01:43:51
now it's not
2024-12-05 01:43:56
now it's not doing anything weird <:Madge:859968580996956200>
bonnibel
2024-12-05 01:52:31
`ffmpeg -i butterfly.png -init_hw_device vulkan -vf "libplacebo=format=grayf32:color_trc=linear" -distance 0 butterfly-32.jxl` `ffmpeg -i butterfly.png -init_hw_device vulkan -vf "libplacebo=format=grayf32:color_trc=linear" butterfly-32.pfm` identical results, so probably not libjxl
Traneptora
2024-12-05 01:52:59
ye, I think there may be some sort of white-point compensation happening with libplacebo that's not happening with gray input
bonnibel `ffmpeg -i butterfly.png -init_hw_device vulkan -vf "libplacebo=format=grayf32:color_trc=linear" -distance 0 butterfly-32.jxl` `ffmpeg -i butterfly.png -init_hw_device vulkan -vf "libplacebo=format=grayf32:color_trc=linear" butterfly-32.pfm` identical results, so probably not libjxl
2024-12-05 01:58:46
just tested, it only has any difference with gray
2024-12-05 02:02:58
also tested, it is indeed not an issue with the libjxl wrapper or libjxl
2024-12-05 02:03:05
it looks like the pfm and png output is also having the issue
2024-12-05 02:04:23
also compared the 16-bit png input to hydrium and libjxl and got similar results
bonnibel `ffmpeg -i butterfly.png -init_hw_device vulkan -vf "libplacebo=format=grayf32:color_trc=linear" -distance 0 butterfly-32.jxl` `ffmpeg -i butterfly.png -init_hw_device vulkan -vf "libplacebo=format=grayf32:color_trc=linear" butterfly-32.pfm` identical results, so probably not libjxl
2024-12-05 02:25:36
reported, here's irc log ``` [2024-12-04_21:19:25] <Traneptora> do ffmpeg -i in.png -vf libplacebo=format=grayf32 out.pfm [2024-12-04_21:19:33] <Traneptora> then compare in.png to out.pfm using e.g. mpv [2024-12-04_21:22:43] <Traneptora> https://0x0.st/X7W3.png https://0x0.st/X7WY.png [2024-12-04_21:23:02] <Traneptora> ffmpeg -i george-gray.png -vf libplacebo=format=grayf32 test.pfm [2024-12-04_21:23:08] <Traneptora> and then mpv --no-config --pause --screenshot-format=png george-gray.png test.pfm [2024-12-04_21:23:12] <Traneptora> take Ctrl+s screenshots [2024-12-04_21:23:30] <Traneptora> adding :range=pc to the libplacebo command doesn't change anything ```
bonnibel
2024-12-05 02:27:38
thank you!
jonnyawsom3
2025-01-08 08:51:10
Stretching this channel a bit, but does anyone know of (ideally) a WASM tool that uses blue noise dithering, or even better anything that uses the gaussian blue noise mentioned the other day? So far I've only found Surma's old tool https://surma.dev/lab/ditherpunk/lab
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
2025-01-17 12:19:30
noticed that the JXL toolchain distributed by Nixpkgs no longer contains `jpegli` as of `0.11.1` is this intentional upstream?
RaveSteel
2025-01-17 12:47:50
jpegli has been moved to its own repository
A homosapien
2025-01-17 01:17:22
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
2025-01-17 01:08:32
hopefully someone can also begin building `jpegli` for Nixpkgs
Meow
2025-01-17 02:13:20
Homebrew failed to include `jpegli`
Demiurge
2025-01-18 01:38:30
Please just merge it back into libjxl...
2025-01-18 01:41:33
There's no reason to separate it... just separate the dependency-ridden cjxl/djxl code from the library code!
2025-01-18 01:41:54
:(
2025-01-18 01:43:44
Nothing else needs to be separated
CrushedAsian255
2025-01-18 02:00:46
possibly jpegli could even be integrated into libjxl (definitely djpegli)
2025-01-18 02:00:53
as its based on similar technologies
Demiurge
2025-01-18 05:24:24
They never should have been separated... the only thing that makes sense to separate is the example tools that require a lot of external dependencies to build
2025-01-18 05:35:15
You know. Things that **actually** affect how convenient it is for library users to build the library.
๐‘›๐‘ฆ๐‘•๐‘ฃ๐‘ธ๐‘ฅ๐‘ฉ๐‘ฏ๐‘ฆ | ๆœ€ไธ่ชฟๅ’Œใฎไผๆ’ญ่€… | ็•ฐ่ญฐใฎๅ…ƒ็ด 
2025-01-19 06:32:11
is there a WASM build of SSIMULACRA2 for use in web browsers and Deno?
damian101
Demiurge They never should have been separated... the only thing that makes sense to separate is the example tools that require a lot of external dependencies to build
2025-01-20 12:34:51
In principle I'm totally fine with the projects being separated, might even be useful considering the option to replace libjpeg libraries with jpegli ones... However, you currently can't simply build jpegli from the jpegli repository without conflicting with a bunch of libjxl stuff. Not even by setting cmake flags. And jpegli currently also isn't versioned.
2025-01-20 12:40:56
No wonder jpegli isn't packaged anywhere.
Demiurge
2025-01-20 01:36:12
It would be nice if it also would install jpegli header file for software that wants to use `jpegli_` api and also maybe a libjpeg header file that allows you to compile existing software to use jpegli instead, by macroing all `jpeg_` calls to `jpegli_`
2025-01-20 01:38:05
So the compiled software uses jpegli symbols instead of libjpeg ones
damian101
2025-01-20 10:47:17
yeah
Demiurge
2025-01-23 06:48:59
Anyone here know of a tool (preferably commandline) to attach an icc profile to a jpeg or png without modifying other data structures?
jonnyawsom3
2025-01-23 06:50:45
Exiftool?
Demiurge
2025-01-23 06:57:02
I thought that's a read only tool
_wb_
2025-01-23 07:12:16
Nope it can write too
Demiurge
2025-01-23 07:40:57
Okay here's another neat question for ya nerdy bunch. I have an EDID binary image from my monitor firmware, the EDID data structure contains white point and chromacity coordinate data and gamma information. How do I create a color profile based off this data? Why can't I find a tool that does this?
2025-01-23 07:43:42
Do I have to parse it myself with perl cuz I don't even know what illuminant these chromacity coordinates are in reference to in the edid data structure
2025-01-23 07:44:18
d50 like same as icc pcs?
2025-01-23 07:58:46
edid spec says the coordinates are according to "CIE publication 15.2"
2025-01-23 07:59:41
Has no one wrote a perl script to convert an edid.bin to an icc profile? :(
Traneptora
Demiurge Has no one wrote a perl script to convert an edid.bin to an icc profile? :(
2025-01-23 08:38:09
I believe DisplayCal can do it
spider-mario
2025-01-23 09:16:51
correct
2025-01-23 09:17:36
it doesnโ€™t take the edid.bin as input; it just reads it directly from the display
Quackdoc
2025-01-23 09:57:25
I don''t know if the gui can use bin files, but if you use the python api it can
dogelition
2025-01-24 01:40:02
note that the white point and gamma in the edid are probably useless
2025-01-24 01:40:24
iirc the white point is technically supposed to match the monitor's out of the box settings
2025-01-24 01:41:01
i'd just use edid-decode and copy over the primaries to displaycal's synthetic profile creator
Demiurge
2025-01-24 09:34:48
Displaycal has a Python api and a gui profile creator?
spider-mario correct
2025-01-24 10:49:00
2025-01-24 10:49:42
Can't save an .icc profile :(
CrushedAsian255
2025-01-24 10:52:26
yay python
spider-mario
2025-01-24 10:57:46
seems like a bug in the python 3 port
2025-01-24 10:57:53
(the upstream is still python 2 iirc)
2025-01-24 10:58:39
ah, right, Arch is getting it from https://github.com/eoyilmaz/displaycal-py3
2025-01-24 10:58:47
might be worth raising an issue there
Demiurge
2025-01-24 11:29:09
ah, python2 is not available on arch anymore and is utterly discontinued upstream and not receiving security fixes from the python project.
Quackdoc
Demiurge
2025-01-24 06:52:06
pip the python2 version