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

libjxl

Demiurge
2024-09-12 07:48:27
It could be more simple and flexible, for a widely consumed codec library
2024-09-12 07:54:47
Any unnecessary differences in complexity compared to other common codec libraries is an unnecessary barrier to adoption. Ideally it should be as straightforward as brotli, but that's probably too optimistic. At least libwebp, then, since that's a mature and established competitor.
A homosapien
2024-09-12 08:04:14
Oh yeah, I opened a thread here for uploading image which JXL struggles to compress: https://discord.com/channels/794206087879852103/1278292301038227489
spider-mario
Demiurge The build system for libjxl is kinda stiff and obtuse in my experience.
2024-09-12 09:19:13
it should just be a matter of having the appropriate submodules present (if not using git, we have `deps.sh` to do that) and then running cmake as usual (which is also used by libpng, libjpeg-turbo and libwebp so arguably not that obscure)
2024-09-12 09:19:23
what are differences in complexity that you have encountered?
Demiurge
2024-09-12 09:37:53
Well for example it's not easy to compile multiple objects for libjpeg/jpegli for different abi versions. It would be nice if there was more granularity and control over what gets compiled, where it gets installed, and with which settings (like api version)
2024-09-12 09:57:34
Also I have a feeling a small readable makefile with zero logic would cover 99% of people
Traneptora
spider-mario what are differences in complexity that you have encountered?
2024-09-13 05:52:02
JPEGXL_STATIC doesn't work when linking with system libraries
2024-09-13 05:52:17
it attempts to link in /usr/lib/libpng.so statically
2024-09-13 05:52:32
if you disable JPEGXL_STATIC it dynamically makes libjxl.so as well
Quackdoc
Demiurge It could be more simple and flexible, for a widely consumed codec library
2024-09-13 05:52:52
~~time to port it to meson~~
Traneptora
2024-09-13 05:54:53
bundling in all the dependencies as submodules is a very google thing to do and also not ideal
2024-09-13 05:54:58
IMO
Quackdoc
2024-09-13 06:02:20
I personally prefer it so long as it's optional
Traneptora
2024-09-13 06:02:37
it isn't optional because the thing will fail to build if you don't clone all the billion repos
Quackdoc
2024-09-13 06:02:46
it gives a very solid ecosystem of support that you don't have to worry about distros mucking it about.
Traneptora it isn't optional because the thing will fail to build if you don't clone all the billion repos
2024-09-13 06:03:02
this seems like a cmake config issue [Hmm](https://cdn.discordapp.com/emojis/1113499891314991275.webp?size=48&quality=lossless&name=Hmm)
Traneptora
2024-09-13 06:03:12
no, it literally just says "please run ./deps.sh"
2024-09-13 06:03:30
regardless of whether or not you actually need them
Demiurge
2024-09-13 06:06:00
idk, look how much more approachable literally every other codec library source tree looks compared to the spaghetti that is libjxl
Quackdoc
2024-09-13 06:06:02
yeah this is a config issue, for instance png ```cmake # libpng if (JPEGXL_BUNDLE_LIBPNG AND EMSCRIPTEN) if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/libpng/CMakeLists.txt") message(FATAL_ERROR "Please run ${PROJECT_SOURCE_DIR}/deps.sh to fetch the " "build dependencies.") endif() ... ```
2024-09-13 06:06:37
this isn't inherently an issue with submodules, it's just that it's hard coded in cmake currently
Demiurge
2024-09-13 06:06:38
It definitely sticks out compared to every other codec libraries I have seen, even it's predecessors PIK and FUIF source trees
2024-09-13 06:06:53
It just got more messy and spaghetti like over time
Traneptora
Quackdoc this isn't inherently an issue with submodules, it's just that it's hard coded in cmake currently
2024-09-13 06:06:57
it's a problem because they force you to clone them
Quackdoc
Demiurge It definitely sticks out compared to every other codec libraries I have seen, even it's predecessors PIK and FUIF source trees
2024-09-13 06:07:20
I personally really like how the actual source is layed out myself, my only issue is the buld system
Traneptora
2024-09-13 06:07:20
regardless of why it's a problem, the libjxl build system definitely could use improvement
Quackdoc
2024-09-13 06:07:30
[yep](https://cdn.discordapp.com/emojis/1075610585141628928.webp?size=48&quality=lossless&name=yep)
Traneptora
2024-09-13 06:07:42
really? libjxl code is some of the most unreadable library code I've ever seen
Demiurge
2024-09-13 06:07:44
It's not a matter of more code either, but how it's organized into manageable and logical parts
Quackdoc
2024-09-13 06:08:45
yeah, maybe it's mostly cause I just use vscode or a configured vim + grep for navigation, but I rather like it as far as C/C++ projects go
Demiurge
2024-09-13 06:08:46
The different components are not clearly separated.
Traneptora
2024-09-13 06:10:09
yea, figuring out where something is done is very hard
2024-09-13 06:10:12
if you aren't alreayd familiar
Demiurge
2024-09-13 06:13:12
There should be a more clear separation between the library code, and the utility code. And the devtools from the basic tools.
Quackdoc
2024-09-13 06:13:16
well in any case ~~meson when~~ the build system for sure is my biggest gripe with cross compiling and what not
Demiurge
2024-09-13 06:17:31
And it should be simpler to build multiple versions of libjpeg for the different API levels, and have the build artifacts in separate locations, so it's easier for packagers to create packages for "libjxl-jpegli" or "libjpeg-jpegli" or whatever packagers end up naming the package.
2024-09-13 06:18:40
idk what's so great about meson compared to cmake though. I am not an expert in either, but you know you can tell cmake to generate a ninja build system?
2024-09-13 06:19:19
I believe for 99% of people a really dumb zero-logic makefile will do the job
Quackdoc
2024-09-13 06:21:21
none of them are really special, it's just meson is a lot easier to read and write IMO, and has some nice "constant" options for things like static compilation
_wb_
2024-09-13 06:21:40
In the library code itself, it would be good if we could better separate encoder, decoder, and unit tests. Even if only to make it easier to count lines of code of the decoder 🙂
Quackdoc
2024-09-13 06:22:26
xD
Oleksii Matiash
2024-09-13 06:37:09
Probably it was already asked, but I did not see the answer. Is it possible to add png compression level switch to djxl, or at least switch to enable\disable png compression? For large files in a batch png compression uses more time than jxl decoding itself. I know that there are P*M formats for every usecase, but png is much more convenient for average user
jonnyawsom3
2024-09-13 06:39:04
It should be possible, but it's been mentioned a lot about changing to a different, faster PNG library too
Demiurge
2024-09-13 08:16:05
I don't know anything about meson other than it requires python.
Oleksii Matiash Probably it was already asked, but I did not see the answer. Is it possible to add png compression level switch to djxl, or at least switch to enable\disable png compression? For large files in a batch png compression uses more time than jxl decoding itself. I know that there are P*M formats for every usecase, but png is much more convenient for average user
2024-09-13 08:16:57
add a call to `png_set_compression_level()` to this file: https://github.com/libjxl/libjxl/blob/main/lib/extras/enc/apng.cc ideally send a pull request afterwards too. I recommend maybe setting it to 3.
2024-09-13 08:18:26
or lower. The PNG encoder is extremely slow, orders of magnitude slower than decoding the image, so it would be great if people didn't get a bad impression of decoding speeds by accident because of this. It's kind of embarrassing.
CrushedAsian255
2024-09-13 08:19:18
also it would kinda make jxl look better
2024-09-13 08:19:27
oh look how large this PNG is compared to the JXL
2024-09-13 08:19:53
although that could be cheating idk
Demiurge
2024-09-13 08:21:22
even oxipng is so much faster than libpng default settings ;_;
2024-09-13 08:21:32
It's horrible
jonnyawsom3
2024-09-13 08:24:22
If I recall oxipng allows feeding direct image data to use as a library
CrushedAsian255
2024-09-13 08:24:53
what does `jxl-oxide` use?
username
2024-09-13 08:30:39
*speaking of speed* https://discord.com/channels/794206087879852103/804324493420920833/1204883195926024212
Demiurge
2024-09-13 08:48:40
literally someone just needs to add this line `png_set_compression_level(png_ptr, 3);` after this initialization in `apng.cc`: ```cc png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png_ptr) return JXL_FAILURE("Could not init png encoder"); info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) return JXL_FAILURE("Could not init png info struct"); ``` ez patch
2024-09-13 08:49:07
make it even less than 3 if that's too slow.
2024-09-13 08:49:15
Haven't done a speed test yet
CrushedAsian255
2024-09-13 08:50:53
"good first issue"?
TheBigBadBoy - 𝙸𝚛
2024-09-13 08:51:34
```diff png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png_ptr) return JXL_FAILURE("Could not init png encoder"); info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) return JXL_FAILURE("Could not init png info struct"); + png_set_compression_level(png_ptr, 3); ```
CrushedAsian255
TheBigBadBoy - 𝙸𝚛 ```diff png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png_ptr) return JXL_FAILURE("Could not init png encoder"); info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) return JXL_FAILURE("Could not init png info struct"); + png_set_compression_level(png_ptr, 3); ```
2024-09-13 08:52:39
i would but i can't work out the SLA's
2024-09-13 08:52:48
CLA's ?
2024-09-13 08:52:51
can't remember what they're called
TheBigBadBoy - 𝙸𝚛
2024-09-13 08:53:20
and so I don't know what you mean <:KekDog:805390049033191445>
Demiurge
2024-09-13 08:53:23
Crazy Lawyer Agreement
CrushedAsian255
2024-09-13 08:54:21
[Contributor Licence Agreement](https://code.google.com/legal/individual-cla-v1.0.html)
Demiurge
2024-09-13 08:55:48
By signing this legally binding agreement, you hereby agree that Google is the best company ever and irrevokably forfeit your rights over your soul. Press Accept to continue.
2024-09-13 08:58:17
Click Submit to submit.
CrushedAsian255
2024-09-13 08:58:45
i'll click submit once the chrome codec team gets their mind together
jonnyawsom3
2024-09-13 09:20:22
https://github.com/libjxl/libjxl/pull/3819
2024-09-13 09:20:27
Well hopefully that's right
Demiurge
2024-09-13 09:21:27
Wow, that's awsum.
2024-09-13 09:22:00
Looks right but did you compile and test?
2024-09-13 09:22:14
Measure the improvement?
jonnyawsom3
2024-09-13 09:22:57
Letting Github actions do half of that for me, but I did check zlib benchmarks and 3 does seem like a good value. Around 2x faster at a 2-3% density decrease
Demiurge
2024-09-13 09:22:58
I'd be curious to know the result.
Letting Github actions do half of that for me, but I did check zlib benchmarks and 3 does seem like a good value. Around 2x faster at a 2-3% density decrease
2024-09-13 09:24:33
That's ludicrous and really makes me wonder why the zlib default is so awful.
username
2024-09-13 09:25:47
they probably expect people to change the value for their use-case or something idk
Demiurge
2024-09-13 09:26:47
2% for 200% is never a good tradeoff
jonnyawsom3
2024-09-13 09:27:07
``` Level Comp Comptime min/avg/max/stddev Decomptime min/avg/max/stddev Compressed size 1 44.805% 0.512/0.536/0.544/0.008 0.128/0.141/0.145/0.003 7,050,618 2 43.764% 0.563/0.586/0.593/0.006 0.129/0.138/0.142/0.002 6,886,856 3 42.712% 0.687/0.725/0.736/0.010 0.129/0.136/0.139/0.002 6,721,288 4 42.062% 0.716/0.778/0.788/0.010 0.123/0.134/0.138/0.003 6,619,035 5 41.235% 0.953/1.037/1.072/0.035 0.123/0.134/0.137/0.003 6,488,854 6 40.734% 1.287/1.428/1.499/0.065 0.123/0.132/0.135/0.003 6,409,974 7 40.628% 1.520/1.692/1.790/0.087 0.124/0.131/0.135/0.002 6,393,327 8 40.505% 2.289/2.527/2.642/0.102 0.119/0.132/0.135/0.003 6,374,005 9 40.490% 2.501/2.760/2.883/0.101 0.123/0.131/0.135/0.003 6,371,682```
2024-09-13 09:27:25
Stolen from a github page comparing zlib to other forks <https://github.com/zlib-ng/zlib-ng/discussions/871>
Demiurge
2024-09-13 09:29:38
Might actually be better to set it to 2 actually
jonnyawsom3
2024-09-13 09:30:04
I mean ideally we'd switch to a faster library entirely
_wb_
2024-09-13 09:30:23
The assumption is often that encode speed matters less than decode speed. Except here of course the encode is done just to store the result of a decode 🙂
Demiurge
2024-09-13 09:30:35
Yep well that takes more time than 1 line of code
username
2024-09-13 09:30:51
posting this again because it's relevant: https://discord.com/channels/794206087879852103/804324493420920833/1204883195926024212
CrushedAsian255
2024-09-13 09:31:07
is zlib-ng a dropin?
jonnyawsom3
2024-09-13 09:31:15
*Technically* setting it to 0 would mean minimal impact on JXL decode time
CrushedAsian255
*Technically* setting it to 0 would mean minimal impact on JXL decode time
2024-09-13 09:31:29
congrats, you invented bmp
Demiurge
2024-09-13 09:31:43
I heard Luca was planning on porting pnge to libjxl
username
CrushedAsian255 is zlib-ng a dropin?
2024-09-13 09:32:59
API and ABI wise yes if it's compiled with `ZLIB_COMPAT` although I'm not a build system person so idk how much effort it would be from that angle.
Demiurge
2024-09-13 09:33:30
If fpnge happens then there's no need to worry about zlib or whatever
_wb_
2024-09-13 09:34:05
Maybe someone could take <@179701849576833024>'s super fast PNG encoder and convert the x86 intrinsics to generic highway simd so it is portable. And then we could use that to write PNG extremely fast. It would also be nice if we can get rid of the libpng dependency completely, so also for the decoding...
Demiurge
2024-09-13 09:34:15
Luca wrote the fastest png encoder ever afaik
2024-09-13 09:35:27
You could also use simde instead of highway to make it portable in a more lazy way
_wb_
Demiurge Luca wrote the fastest png encoder ever afaik
2024-09-13 09:35:49
Yeah fpnge, but it's currently x64-only iirc. We need something that works on all platforms, even if it's somewhat less efficient.
Demiurge
2024-09-13 09:36:03
It wouldn't be as optimized on non intel though
2024-09-13 09:36:19
Simde then!
veluca
_wb_ Maybe someone could take <@179701849576833024>'s super fast PNG encoder and convert the x86 intrinsics to generic highway simd so it is portable. And then we could use that to write PNG extremely fast. It would also be nice if we can get rid of the libpng dependency completely, so also for the decoding...
2024-09-13 09:36:21
That someone is not me 😛
Demiurge
2024-09-13 09:37:13
Simde provides platform specific vectors on other platforms in a sorta hacky way
2024-09-13 09:37:26
But that's to be expected
2024-09-13 09:38:26
Idk how it compares to highway in terms of stability. But it's definitely less work than porting to hwy
2024-09-13 09:40:02
It's a drop-in, portable implementation of platform specific vectors
_wb_
2024-09-13 09:40:54
But we depend on hwy already anyway, seems more sensible to use it than to bring in a new dependency.
Demiurge
2024-09-13 09:43:29
True... but, as long as you keep it under the fpnge folder, it should be fine...
2024-09-13 09:43:38
It's a header-only library
2024-09-13 09:44:15
and it would only be used to make fpnge portable in the laziest way possible
jonnyawsom3
https://github.com/libjxl/libjxl/pull/3819
2024-09-13 09:48:27
Just tested it with an 8192 x 8192 8 bit normal map texture ```Main 53.5 MB 32.45 Seconds PNG3 61.6 MB 12.84 Seconds PNG1 65.1 MB 8.55 Seconds PPM 192 MB 3.71 Seconds No Output ?.?? MB 3.16 Seconds``` 20% Filesize increase for a 73% Speed increase at level 1
2024-09-13 09:51:08
So 3x speed increase, but it still takes around 3x longer than the actual JXL decoding
2024-09-13 09:59:36
Gonna edit the PR to use 1, let GA run so I can test and see what it's like. Worst case I'll just change it back to 2 or 3
2024-09-13 10:02:42
I'm sure I win a contest for laziest high effort coder, only editing on Github and making Actions compile so I don't have to download anything
2024-09-13 10:33:38
Running a few tests, including 16 bit, it's consistently that ratio +/-5% on both density and speed. If everyone else thinks that's fine, then level 1 should do until a replacement library can be used
2024-09-13 10:35:46
``` Main 3.63 MB 1.47 Seconds PNG3 3.95 MB 0.51 Seconds PNG1 4.10 MB 0.36 Seconds PPM 5.93 MB 0.09 Seconds No Output ?.?? MB 0.09 Seconds```
2024-09-13 10:40:08
So still 2x slower than the decode itself, but that's the best we're getting without just re-making PPM
CrushedAsian255
2024-09-13 10:41:44
how fast is PPM?
jonnyawsom3
2024-09-13 10:42:50
Same as `--disable_output`, but I expect that could change with huge image sizes
CrushedAsian255
2024-09-13 10:43:19
what about the file size?
jonnyawsom3
2024-09-13 10:43:55
Added to the charts, running on the 8K file writing the PPM added around half a second, so I was right about that
_wb_
2024-09-13 11:57:14
btw https://github.com/libjxl/libjxl/releases/tag/v0.11.0 dropped
CrushedAsian255
_wb_ btw https://github.com/libjxl/libjxl/releases/tag/v0.11.0 dropped
2024-09-13 12:00:04
yay
2024-09-13 12:00:33
now just waiting for Homebrew to update
_wb_
2024-09-13 12:01:35
a Friday-the-13th release, I wonder if we'll need a v0.11.1 soon 🙂
TheBigBadBoy - 𝙸𝚛
CrushedAsian255 now just waiting for Homebrew to update
2024-09-13 12:01:46
lol
CrushedAsian255
2024-09-13 12:01:56
good job scoop
2024-09-13 12:02:05
unless they're always up to date with `HEAD`
TheBigBadBoy - 𝙸𝚛
2024-09-13 12:02:47
oh Scoop is.... for Windows <:SadCheems:890866831047417898>
Oleksii Matiash
_wb_ a Friday-the-13th release, I wonder if we'll need a v0.11.1 soon 🙂
2024-09-13 12:04:08
When I was ~~overtiming~~ working in Samsung, we had a sad joke, that we invented new end of working ~~night~~ day git push strategy: push-and-run (out of the office, before any conflicts appear). Just reminded me
CrushedAsian255
Oleksii Matiash When I was ~~overtiming~~ working in Samsung, we had a sad joke, that we invented new end of working ~~night~~ day git push strategy: push-and-run (out of the office, before any conflicts appear). Just reminded me
2024-09-13 12:04:43
`git push --force`
Oleksii Matiash
CrushedAsian255 `git push --force`
2024-09-13 12:05:13
No, the idea is to be able to leave office before issues are noticed
CrushedAsian255
2024-09-13 12:05:29
never push new code on a friday
TheBigBadBoy - 𝙸𝚛
2024-09-13 12:09:26
`sleep 12h; git push --force` 💯
Meow
2024-09-13 12:42:46
macOS, not MacOS
Demiurge
Gonna edit the PR to use 1, let GA run so I can test and see what it's like. Worst case I'll just change it back to 2 or 3
2024-09-13 12:46:16
Z_BEST_SPEED is a macro you can use instead of 1
jonnyawsom3
2024-09-13 12:47:00
Welp it's already merged so feel free to make another 1 line PR xP
Demiurge
2024-09-13 12:47:13
Oh lmao
2024-09-13 12:47:22
That was fast
TechPizza
_wb_ btw https://github.com/libjxl/libjxl/releases/tag/v0.11.0 dropped
2024-09-13 02:11:33
is "avoiding abort in release build" indicative of progress towards not aborting on memory allocations too?
_wb_
2024-09-13 02:42:29
yep
RaveSteel
2024-09-14 11:25:23
https://files.catbox.moe/ebskml.png cjxl v0.11.0 is not able to encode this PNG, it does works with 0.10.3 though
2024-09-14 11:25:36
"Getting pixel data failed"
2024-09-14 11:26:32
It works after using oxipng on it `Removing sBIT chunk as it no longer matches the image data`
jonnyawsom3
2024-09-15 06:12:16
Can't find it, but I thought someone made an issue about that already. Maybe it was only mentioned here
CrushedAsian255
2024-09-15 06:14:26
od
2024-09-15 06:14:36
sBIT is for signalling significant bits
2024-09-15 06:14:43
maybe JXL is having issues truncating the values
2024-09-15 07:03:21
Is there any way to get the size of the original JPEG from a transcoded JXL?
2024-09-15 07:03:44
I want to write a FUSE file system that transparently compresses JPEGs to JXL and back
2024-09-15 07:03:56
Like disk compression but specifically JXL
_wb_
2024-09-15 07:09:20
I don't think you can easily get that info without doing an actual reconstruction
CrushedAsian255
2024-09-15 07:15:02
How fast is reconstruction?
_wb_
2024-09-15 07:25:44
It's basically only entropy decode followed by fixed Huffman encode. So quite fast. Not fast enough to do it on the fly just to do `ls` though 🙂
CrushedAsian255
2024-09-15 07:26:17
Maybe I can cache the sizes
_wb_
2024-09-15 10:55:02
Just treat it like any non-jpeg file
2024-09-15 12:39:09
https://repology.org/badge/vertical-allrepos/libjxl.svg?exclude_unsupported=1&columns=3&exclude_sources=modules,site&header=libjxl%20packaging%20status&minversion=0.10
2024-09-15 12:42:07
maybe we should add this `&minversion=0.10` to that packaging overview on the github main page, i.e. if a distro is more than one minor version number behind, it becomes a darker red than the current red...
HCrikki
2024-09-15 02:59:56
handful of distros missing (ie mx current, rosa, endeavour, cachyos, popos, nobara, ubuntu next/nightly) and other relevant package names not tracked (ie enlightenment desktop's imlib2-jxl, loader variants and packages integrating or requiring libjxl like imagick)
Meow
2024-09-15 03:22:57
==> Upgrading jpeg-xl 0.10.3 -> 0.11.0 ==> Pouring jpeg-xl--0.11.0.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/jpeg-xl/0.11.0: 64 files, 45.6MB
_wb_
HCrikki handful of distros missing (ie mx current, rosa, endeavour, cachyos, popos, nobara, ubuntu next/nightly) and other relevant package names not tracked (ie enlightenment desktop's imlib2-jxl, loader variants and packages integrating or requiring libjxl like imagick)
2024-09-15 03:53:45
Can you report this to repology.org?
AccessViolation_
2024-09-15 07:38:38
I'm having problems with the libjxl debian package. It's not in the package manager (I almost accidentally installed `libjxr-tools`) so I tried the .deb file from the 0.11.0 release on github, which installed fine, but it doesn't seem to make any CLI tools available
BabylonAS
2024-09-15 07:39:40
`rehash`
AccessViolation_
BabylonAS `rehash`
2024-09-15 07:41:47
what do you mean?
BabylonAS
2024-09-15 07:43:31
zsh doesn't automatically recognize newly installed programs in PATH
AccessViolation_
2024-09-15 07:44:37
Running rehash didn't work, and it doesn't work from the bash shell either
2024-09-15 07:44:41
I've never had this problem before
RaveSteel
2024-09-15 07:45:22
Have you tried whether it works in bash?
AccessViolation_
2024-09-15 07:45:39
Yeh, doesn't work either
RaveSteel
2024-09-15 07:45:48
I think the correct package is libjxl-tools
2024-09-15 07:46:05
Is that available for you?
AccessViolation_
2024-09-15 07:47:47
No, it wasn't. So I used the release from github. I tried installing these two. The first one errors with code 100, and the second one is successfully installed but doesn't seem to make any commands available
RaveSteel
2024-09-15 07:48:33
Is cjxl in your /usr/bin/?
2024-09-15 07:48:54
try `type cjxl` or do an ls
_wb_
2024-09-15 07:49:18
What distro are you using?
AccessViolation_
2024-09-15 07:49:30
I'm using Pop!_OS
RaveSteel Is cjxl in your /usr/bin/?
2024-09-15 07:49:40
It's not :/
_wb_
2024-09-15 07:50:32
What error do you get when installing the first package?
2024-09-15 07:52:09
I think the jxl package contains cjxl and djxl, and depends on the libjxl package
AccessViolation_
2024-09-15 07:52:16
Oh, these apparently: ``` The following packages have unmet dependencies: jxl : Depends: libjpeg62-turbo (>= 1.3.1) but it is not installable Depends: libopenexr-3-1-30 (>= 3.1.5) but it is not installable Depends: libtcmalloc-minimal4 (>= 2.10) but it is not going to be installed E: Unable to correct problems, you have held broken packages. ```
RaveSteel
2024-09-15 07:53:46
You should use the ubuntu 22.04 libjxl release since popos is based around Ubuntu LTS https://github.com/libjxl/libjxl/releases/download/v0.11.0/jxl-debs-amd64-ubuntu-22.04-v0.11.0.tar.gz
AccessViolation_
2024-09-15 07:54:19
Ohhh. Right. I'll try that, thanks
RaveSteel
2024-09-15 07:54:31
If this doesn't work either just download the binaries via https://github.com/libjxl/libjxl/releases/download/v0.11.0/jxl-linux-x86_64-static-v0.11.0.tar.gz and put them in your PATH lol
_wb_
2024-09-15 07:54:45
Also tell your distro to get jxl in it 🙂
AccessViolation_
2024-09-15 07:55:45
This distro is actually in the process of dropping GNOME and using a DE + compositor they wrote from scratch, so I'm definitely going to see if I can get them to adopt JXL hehe
2024-09-15 07:56:16
If they're being all new and fancy it doesn't hurt to get JXL in there too!
2024-09-15 07:57:40
Their GUI toolkit is `libcosmic/iced`, which is a Rust library. I'm waiting for the Rust JPEG XL decoder from Google Research to see if I can add it as a library to be used by the image handling code in libcosmic
RaveSteel You should use the ubuntu 22.04 libjxl release since popos is based around Ubuntu LTS https://github.com/libjxl/libjxl/releases/download/v0.11.0/jxl-debs-amd64-ubuntu-22.04-v0.11.0.tar.gz
2024-09-15 08:01:32
this worked, thanks 🙂
RaveSteel
2024-09-15 08:01:42
Perfect
2024-09-15 08:01:44
You're welcome
BabylonAS
AccessViolation_ Their GUI toolkit is `libcosmic/iced`, which is a Rust library. I'm waiting for the Rust JPEG XL decoder from Google Research to see if I can add it as a library to be used by the image handling code in libcosmic
2024-09-15 08:08:17
I thought Mozilla is the one who will develop a Rusty JXL decoder?
jonnyawsom3
2024-09-15 08:10:06
Mozilla wants it, the team here will make it
AccessViolation_
2024-09-15 08:12:16
I thought Google Research was going to make it
username
2024-09-15 08:13:31
well a large amount of the JXL devs are from Google Research
AccessViolation_
2024-09-15 08:14:19
Ah, gotcha
BabylonAS I thought Mozilla is the one who will develop a Rusty JXL decoder?
2024-09-15 08:15:55
[Firefox will consider a Rust implementation of JPEG-XL #1064](<https://github.com/mozilla/standards-positions/pull/1064>) > the team at Google has agreed to apply their subject matter expertise to build a safe, performant, compact, and compatible JPEG-XL decoder in Rust, and integrate this decoder into Firefox.
2024-09-15 08:18:02
I see a surprising amount of people write JPEG XL with a dash that's not supposed to be there
spider-mario
AccessViolation_ I thought Google Research was going to make it
2024-09-15 08:28:37
we are 😉
AccessViolation_
2024-09-15 08:28:54
The Google Research has spoken!
jonnyawsom3
2024-09-15 09:56:03
**The** Google Research himself
Meow
AccessViolation_ I see a surprising amount of people write JPEG XL with a dash that's not supposed to be there
2024-09-16 01:51:39
That inaccuracy always makes me feel disgusted
CrushedAsian255
Meow That inaccuracy always makes me feel disgusted
2024-09-16 01:53:26
JPEG----XL
BabylonAS
2024-09-16 01:55:59
JPEG+XL
CrushedAsian255
2024-09-16 01:56:51
Slightly different but after finalising it’s the same!
AccessViolation_
2024-09-16 01:58:06
I bet everyone's also going to think the XL is for Extra Large
Tirr
2024-09-16 02:00:36
jpeg minus extra large
_wb_
2024-09-16 02:11:45
JPEG⸺XL
2024-09-16 02:12:00
JPEG⸻XL
2024-09-16 02:12:54
JPEG〜XL
2024-09-16 02:13:07
JPEG〰〰〰〰〰〰XL
afed
2024-09-16 02:15:55
JPEG±XL JPEG⁺∕₋XL JPEG|XL
BabylonAS
2024-09-16 02:17:12
JPEG_XL
2024-09-16 02:17:39
(which has the advantage of normalizing to space on Wikipedia and other MediaWiki-based sites)
_wb_
2024-09-16 02:17:44
JPEG‾XL
2024-09-16 02:18:36
JPEG‾‾‾‾‾‾‾XL
jonnyawsom3
2024-09-16 02:27:32
JPEG™XL
monad
2024-09-16 02:29:20
```J P E G \/ | /\ |_```
BabylonAS
2024-09-16 02:32:59
doing ASCII art now, heh?
2024-09-16 02:33:20
``` / ‾| \/ | | /\ |_ / ```
AccessViolation_
2024-09-16 02:34:06
giggling at the thought of a manager walking in and just seeing the last like 12 messages
BabylonAS (which has the advantage of normalizing to space on Wikipedia and other MediaWiki-based sites)
2024-09-16 02:36:14
If you go with a hyphen you can sit back and enjoy watching wiki editors argue about which specific dash it is and whether they should use that or use the minus sign for simplicity
_wb_
2024-09-16 02:38:07
`_| >< |_`
Meow
_wb_ `_| >< |_`
2024-09-16 02:41:55
The new logo on jpegxl.info
_wb_
2024-09-16 02:42:39
``` _ __ ___ __ _ _ _ | |_)|_ / __ \/ | \_| | |__ \_/ _/\_ |_/ ```
BabylonAS
_wb_ `_| >< |_`
2024-09-16 02:44:20
Looks like a new emoticon sequence
_wb_
2024-09-16 02:44:34
``` _ __ ___ _ _ _ _ | |_)|_ / __ \/ | (__| | |__\__) _/\_ |__) ```
BabylonAS
2024-09-16 02:44:38
like the ¯\_(ツ)_/¯
Quackdoc
_wb_ JPEG〜XL
2024-09-16 02:45:07
I like this one a lot ngl
_wb_
2024-09-16 02:48:46
JPEG¬XL
2024-09-16 02:49:20
where ¬ is the logical not
BabylonAS
2024-09-16 02:58:20
but that gives regular JPEG
jonnyawsom3
2024-09-16 03:00:54
(I may be biased to this one)
monad
2024-09-16 03:05:54
JPEG<:pancakexl:1283670260209156128>XL
jonnyawsom3
2024-09-16 03:07:19
Should put your tile heuristics to work with a JXL logo made of the pancake emoji
Meow
(I may be biased to this one)
2024-09-16 03:08:04
Jonny
jonnyawsom3
2024-09-16 03:08:57
awsom3 Although in another server, the name is a bit more fitting
monad
2024-09-16 03:09:28
JPEG -v -v XL
AccessViolation_
2024-09-16 03:09:59
`$ jpeg --xl`
monad
2024-09-16 03:14:38
``` J L J X X L J L```
AccessViolation_
2024-09-16 03:16:36
honestly the new JXL logo from the community website is so freaking cool, I hope projects adapt it as the icon for JXL files. The official one <:JPEG_XL:805860709039865937> is much less appealing imo
_wb_
2024-09-16 03:21:50
yeah <@594623456415449088> and his team did a great job on that logo — they made a bunch of really cool logos, but that one was the best.
w
2024-09-16 03:31:41
i like the old one
jonnyawsom3
2024-09-16 03:33:15
<:JPEG_XL:805860709039865937><:JXL:805850130203934781><:Xjxl:822166843313225758><:pancakexl:1283670260209156128>
2024-09-16 03:33:17
AccessViolation_
2024-09-16 03:43:03
Did someone actually make the JPEG XL pancake
monad
2024-09-16 03:43:18
Jon
AccessViolation_ Did someone actually make the JPEG XL pancake
2024-09-16 03:45:10
https://discord.com/channels/794206087879852103/794206170445119489/1283392553613529138
AccessViolation_
2024-09-16 03:45:59
That's so cute
_wb_
2024-09-16 04:05:00
actually that was not the first time
2024-09-16 04:05:02
https://discord.com/channels/794206087879852103/806898911091753051/1036693263446458449
Demiurge
2024-09-16 07:24:55
jpeg -v -v -v -v xl
2024-09-16 07:26:20
I also like the rotationally symmetric <:JXL:805850130203934781>
_wb_
2024-09-16 07:40:27
yeah I also still like that one
2024-09-16 07:40:49
i'd like to keep <:JXL:805850130203934781> as a logo for libjxl
spider-mario
2024-09-16 07:41:04
axially symmetric or rotationally symmetric, take your pick
2024-09-16 07:41:40
(I hesitated to make it “take your PIK”)
jonnyawsom3
2024-09-16 07:41:44
Really should've put a through hole pin on my badge instead of a safety pin so it could spin :P
_wb_
2024-09-16 07:43:19
when people here in Belgium — people who understand Dutch — tell me JPEG XL is a bad name (because the files are not extra large, ha ha), I tell them about the ancestors of jxl
2024-09-16 07:43:34
PIK and FUIF are two Dutch words
2024-09-16 07:43:55
then they usually agree with me that JPEG XL is not that bad, actually
2024-09-16 07:45:29
I guess "PIK FUIF" is like how a French person might interpret the company name "ByteDance"
Fox Wizard
2024-09-16 07:45:39
Pik fuif is a 10/10 name though <:KekDog:884736660376535040>
2024-09-16 07:46:40
Bet if I were to tell younger family members about it, they would tink it's funny <:KekDog:884736660376535040>
_wb_
2024-09-16 07:46:53
high-fidelity d*ck pics thanks to the brand-new "penis party" codec
2024-09-16 07:47:09
nah I'm happy with "JPEG XL"
spider-mario
2024-09-16 07:47:46
even without speaking Dutch, http://wordsafety.com/ would have warned us
2024-09-16 07:48:12
> Direct match, this is probably bad! > 21 million native speakers.
Fox Wizard
2024-09-16 07:49:23
I have a feeling relatives would have like jxl if it meant "dick party" <:KekDog:884736660376535040>
afed
2024-09-16 07:49:31
and even if extra large, extra large might be not about file sizes
2024-09-16 07:54:52
extra large resolution support, for example <:KekDog:805390049033191445>
CrushedAsian255
2024-09-16 08:46:40
Extra large amount of coding tools
AccessViolation_
_wb_ PIK and FUIF are two Dutch words
2024-09-16 08:53:10
As a Dutch person I'm never going to look at these image formats in the same way again, thanks
2024-09-16 08:53:49
Freaking pik and fuif, you can't make that up
CrushedAsian255
2024-09-16 08:57:08
i guess you could say they worked hard on those formats
AccessViolation_
2024-09-16 08:59:50
"JPEG XL images can on average compress down to 60% their original size" => "JPEG XL images can expand to more than twice their original size"
CrushedAsian255
2024-09-16 09:02:10
isn't it 60% of other formats
AccessViolation_
2024-09-16 09:02:14
Alternatively, JPEGGING your pixels until less then half of them are left
CrushedAsian255
2024-09-16 09:02:35
so technically at a bpp of `2.4 bpp` and `24bpc` it expands over 10x
AccessViolation_ Alternatively, JPEGGING your pixels until less then half of them are left
2024-09-16 09:02:47
Squeese transform?
Demiurge
2024-09-16 09:39:18
what's fuif
2024-09-16 09:39:21
in dutch?
spider-mario
2024-09-16 09:40:48
https://en.wiktionary.org/wiki/fuif
_wb_
2024-09-16 09:41:22
It's specifically Belgian Dutch
spider-mario
2024-09-16 09:41:46
> Historically the word was also used in the Netherlands, but usage has become rare.
_wb_
2024-09-16 09:49:56
I thought it would make a funny acronym since English speakers would say fweef and have no clue that it means something
A homosapien
2024-09-16 09:59:55
I thought the name pik was pretty smart not gonna lie. The shorthand of picture (pic) just sounds right in English.
2024-09-16 10:00:11
Never would I have thought it something meant something more vulgar.😂
Traneptora
2024-09-17 12:00:44
what version do I set for jpegli if I want libjpeg 8?
2024-09-17 12:07:05
is it just 8? cause libjpeg6 is 62, is why I'm confused
2024-09-17 12:07:10
(for jpegli)
KKT
2024-09-17 04:17:43
They don't mess around with the Dutch sample sentences on Wiktionary
Fox Wizard
2024-09-17 04:24:53
<:kekw:808717074305122316>
_wb_
2024-09-17 04:40:23
🫣
TheBigBadBoy - 𝙸𝚛
2024-09-17 05:40:36
lmao
jonnyawsom3
2024-09-17 05:43:03
Reminded me of this (18+) https://www.youtube.com/watch?v=9wOUMEVd2XY
2024-09-17 05:43:24
Maybe I should encode it with PIK...
BabylonAS
KKT They don't mess around with the Dutch sample sentences on Wiktionary
2024-09-17 07:24:57
Why did I misread "Netherlands" as "Neanderthals"... (no offense)
2024-09-17 07:25:13
I'm quite prone to misreading though
spider-mario
2024-09-17 08:18:32
maybe “Holland” _is_ better after all!
2024-09-17 08:18:57
_hides_
_wb_
2024-09-17 08:30:30
are you referring to that Wiktionary sample sentence there?
2024-09-17 08:31:39
2024-09-17 08:33:35
"Holland" and "Netherlands" both refer to the fact that the country has some altitude challenges
2024-09-17 08:35:40
but "hol" does have some particular other connotations in Dutch besides just "hollow"
2024-09-17 08:36:03
as Wiktionary seems to be brutally aware of
2024-09-17 08:40:01
oh wait, I always assumed that "Holland" comes from "hol land" (hollow land), but apparently it comes from "houtland" (woodland). TIL
spider-mario
2024-09-17 08:41:56
I was referring to https://youtu.be/2Pcv2ySMi40?t=1m56s
_wb_
2024-09-17 08:53:28
Ah, I like watching that RobWords guy
Traneptora
2024-09-18 03:09:09
it looks like libjpeg-jpegli 8.0 is missing some symbols
2024-09-18 03:09:13
``` /usr/bin/ld: /usr/lib/libtiff.so.6: undefined reference to `jpeg12_write_scanlines@LIBJPEG_8.0' /usr/bin/ld: /usr/lib/libtiff.so.6: undefined reference to `jpeg12_read_scanlines@LIBJPEG_8.0' /usr/bin/ld: /usr/lib/libtiff.so.6: undefined reference to `jpeg12_read_raw_data@LIBJPEG_8.0' /usr/bin/ld: /usr/lib/libtiff.so.6: undefined reference to `jpeg12_write_raw_data@LIBJPEG_8.0' ```
TheBigBadBoy - 𝙸𝚛
Traneptora ``` /usr/bin/ld: /usr/lib/libtiff.so.6: undefined reference to `jpeg12_write_scanlines@LIBJPEG_8.0' /usr/bin/ld: /usr/lib/libtiff.so.6: undefined reference to `jpeg12_read_scanlines@LIBJPEG_8.0' /usr/bin/ld: /usr/lib/libtiff.so.6: undefined reference to `jpeg12_read_raw_data@LIBJPEG_8.0' /usr/bin/ld: /usr/lib/libtiff.so.6: undefined reference to `jpeg12_write_raw_data@LIBJPEG_8.0' ```
2024-09-18 07:15:13
did you link to libjpeg-turbo 3.0.0+ ?
2024-09-18 07:15:17
same issue as here: https://github.com/mozilla/mozjpeg/issues/437
Traneptora
TheBigBadBoy - 𝙸𝚛 did you link to libjpeg-turbo 3.0.0+ ?
2024-09-18 07:25:02
system libtiff so probably
spider-mario
2024-09-18 07:41:19
oh, that new version does support lossless jpeg!
2024-09-18 07:41:55
> Added support for 8-bit-per-component, 12-bit-per-component, and 16-bit-per-component lossless JPEG images. A new libjpeg API function (`jpeg_enable_lossless()`), TurboJPEG API parameters […], and a cjpeg/TJBench option (`-lossless`) can be used to create a lossless JPEG image. (Decompression of lossless JPEG images is handled automatically.)
_wb_
2024-09-18 07:57:07
So after only 31 years, the original JPEG spec is finally getting implemented in more places?
A homosapien
2024-09-18 08:53:01
Wild, what's next? Arithmetic jpeg support?
spider-mario
2024-09-18 09:03:44
that’s already there
2024-09-18 09:04:20
including for 12-bit jpeg, starting with this release > Arithmetic entropy coding is now supported with 12-bit-per-component JPEG images.
yoochan
2024-09-19 05:24:04
Whaaa amazing the amount of energy they are using just to avoid jpeg xl
username
2024-09-19 05:30:39
well libjpeg and libjpeg-turbo has been around forever and the spec for JPEG does have 12-bit stuff defined sooo
2024-09-19 05:31:21
also it already supported 12-bit and arithmetic *separately* but now it supports doing both at the same time it seems
yoochan
2024-09-19 05:34:16
It is nice libjeg-turbo does it. I find the timing of this release suspicious
_wb_
2024-09-19 05:36:20
It's probably just that people are more interested in image formats recently, with HDR becoming more mainstream etc
2024-09-19 05:38:53
Anyway, I think it's too late for JPEG 1 to become a real HDR-capable codec — even though 12-bit mode has been in the spec from the beginning, and even in only 8-bit mode you kind of can do HDR like jpegli does it, and with gain maps you can also do it — since there are just way too many deployments of JPEG implementations that just assume 8-bit buffers are OK.
CrushedAsian255
2024-09-19 05:39:55
Maybe make the new files have a different extension to tell them apart
2024-09-19 05:40:02
Or am I just inventing JPEG XT
_wb_
2024-09-19 05:40:31
Just like JPEG 1 is never going to support alpha transparency even though technically the codec has no problems encoding 4-component images. Too many applications already exist that assume there will be no alpha.
CrushedAsian255
2024-09-19 05:41:08
And also JPEG 1’s performance is bested by most modern formats
2024-09-19 05:41:32
So if you’re going to adopt something that most things won’t support, adopt AVIF or JPEG XL
2024-09-19 05:41:49
You can guess which one of those two I would pick though
username
CrushedAsian255 Or am I just inventing JPEG XT
2024-09-19 05:44:16
thing about JPEG XT is it's fully backwards compatible with pre-existing JPEG decoders while the 12-bit mode in JPEG is not
CrushedAsian255
2024-09-19 05:46:17
So if anything it would probably make more sense to use XT
2024-09-19 05:46:31
So you get new features as well as backwards compatibility
2024-09-19 05:46:41
Instead of using the format in a way that nothing can use
2024-09-19 05:49:54
Annoying thing is the XT SPEC is split into 9 parts so you pay like 1500 for the whole thing
2024-09-19 05:50:12
I don’t actually get why XT wasn’t adopted more
2024-09-19 05:50:14
It seems like a decent idea
2024-09-19 05:50:54
I guess it could be a chicken and egg
2024-09-19 05:51:26
They can be opened in compatibility mode in any software so no software was bothered to the new features
2024-09-19 05:51:43
But then since nothing supported it no one used the features
_wb_
2024-09-19 05:52:42
Yes, I think that's the problem with graceful degradation
2024-09-19 05:53:04
Sometimes breaking things is better than gracefully degrading
AccessViolation_
2024-09-19 07:34:32
Is there a recommended way to losslessly transcode a 287 MB JPEG that does not involve buying five time the RAM I have currently? :p
CrushedAsian255
2024-09-19 07:34:52
Try a lower effort setting?
AccessViolation_
2024-09-19 07:35:12
`--streaming_output` doesn't affect RAM usage, and `--streaming_input` doesn't support JPEG (yet?)
CrushedAsian255 Try a lower effort setting?
2024-09-19 07:35:18
Oo I'll try that
2024-09-19 07:42:10
It seems this jpeg is too powerful even for `--streaming_output --lossless_jpeg=1 -e 1 --num_threads=0` unfortunately
2024-09-19 07:49:47
I could increase disk swap, yeah
Oleksii Matiash
AccessViolation_ Is there a recommended way to losslessly transcode a 287 MB JPEG that does not involve buying five time the RAM I have currently? :p
2024-09-19 07:50:31
Effort 7 and lower are not very memory hungry, I believe. I do not have 287 MB jpeg, but for 81 MB -e7 used 4 GB of ram. Not that terrible
AccessViolation_
2024-09-19 08:14:45
I have effectively 32 GB currently
2024-09-19 08:15:21
I don't care that much anyway, was trying to convert picture from the JWST out of curiosity
RaveSteel
AccessViolation_ Is there a recommended way to losslessly transcode a 287 MB JPEG that does not involve buying five time the RAM I have currently? :p
2024-09-19 08:22:20
Can you share it? I would be interested to try it with my PC
AccessViolation_
2024-09-19 08:37:08
Absolutely
2024-09-19 08:37:57
https://wormhole.app/A1L45#7L1z0dVN2UypjBe_m2pIPQ
2024-09-19 08:38:08
<@167354761270525953>
RaveSteel
2024-09-19 08:38:34
Thank you
AccessViolation_
2024-09-19 08:41:26
Wait this is the night watch, not the JWST picture
2024-09-19 08:41:32
It is the one I was talking about though
CrushedAsian255
2024-09-19 08:54:15
AccessViolation_
2024-09-19 08:56:04
It'd actually be kind of interesting to see how lossless super high resolution scans of old paintings compress down to lossy image formats on their default setting. As a benchmark for how appropriate different formats are for digitally preserving art
CrushedAsian255
2024-09-19 08:57:32
so without jpeg reconstruction?
2024-09-19 08:59:24
this kind of thing is why a progress indicator would be helpful
2024-09-19 08:59:29
maybe an optional callback function?
2024-09-19 09:00:25
like `JxlRegisterProgressHandler(void (*callback)(JxlProgress progress))`
2024-09-19 09:01:04
not sure what exactly would be in `JxlProgress` struct
2024-09-19 09:04:24
ram usage pinned at 58 gb
2024-09-19 09:04:38
maybe i shouldn't have used `-e 9`
monad
2024-09-19 09:10:47
you should use e4
username
2024-09-19 09:12:36
I honestly have a hard time getting lossless images from scanners to begin with, usually they default to JPEG and then when I find a way to get them to output as a lossless format they still end up having JPEG artifacts
2024-09-19 09:12:48
do only higher end ones allow you to get lossless scans?
AccessViolation_
2024-09-19 09:23:41
Apparently there are scanners specifically for paintings, I imagine they might be able to. I can't imagine your average office scanner to be able to do this
2024-09-19 09:25:23
https://www.youtube.com/watch?v=dkrGxjbU8wk
2024-09-19 09:25:34
This might be what my image above was from
2024-09-19 09:26:17
But it may also have been from a scrape of google's high resolution art viewer project
jonnyawsom3
AccessViolation_ Is there a recommended way to losslessly transcode a 287 MB JPEG that does not involve buying five time the RAM I have currently? :p
2024-09-19 09:26:57
I know I mentioned it before that the transcode isn't chunked like lossy and lossless. I've hit 6 GB of memory by nuding it up to e8 on my 12 MP 4 MB phone photos, yet alone JPEGs hitting the dozens of megabytes
AccessViolation_
2024-09-19 09:27:59
Oh wow, I never noticed it was using that much memory, that's interesting
AccessViolation_ https://www.youtube.com/watch?v=dkrGxjbU8wk
2024-09-19 09:29:43
Oh apparently this is a 3D scan as well, because Rembrandt used a lot of thick blobs of paint to represent different textured materials. Yet another use case JPEG XL
jonnyawsom3
2024-09-19 09:29:55
Main issue is the megapixels instead of the filesize. Since JPEGs are lossy you go "Oh it's only 20 MB" and then it expands to 2 GB in memory just to view
Oleksii Matiash
2024-09-19 09:34:00
When jxl is recompressing jpeg does it 'save' 8x8 blocks just with better compression, or changes to VarDCT or something else?
AccessViolation_
2024-09-19 09:37:51
Hmm, I doubt you could do that, and keep it lossless
CrushedAsian255
2024-09-19 09:38:06
It’s just 8x8 but better entropy
2024-09-19 09:38:18
And using Modular for DC instead of whatever JPEG uses
AccessViolation_ Hmm, I doubt you could do that, and keep it lossless
2024-09-19 09:38:58
In some certain cases you might be able to
2024-09-19 09:39:23
Like you could merge 2 empty 8x8 blocks into an 8x16, but I don’t think JXL supports that
2024-09-19 09:39:38
It would barely help and would significantly complicate reconstruction
Oleksii Matiash
2024-09-19 09:40:04
Then it is not clear why libjxl uses SO much memory. Can it just go by one 8x8 at once?
CrushedAsian255
2024-09-19 09:40:15
1. Modular
2024-09-19 09:40:43
2. It still has to decompress the 8x8 blocks into pretty much as much data as an uncompressed image
2024-09-19 09:40:52
Each coeff is 1 byte approx
2024-09-19 09:41:16
3. If you did one by one you would lose a lot of prediction and context modelling
Oleksii Matiash
2024-09-19 09:41:40
Probably 3 is the key
jonnyawsom3
2024-09-19 09:45:59
Or... It just wasn't part of the chunked encoding PRs since it was too much effort or they forgor
AccessViolation_
2024-09-19 09:46:08
Regarding point three, you could still use larger clusters of blocks, like divide the image into 16 chunks which can be done in parallel to improve speed or consecutively to use less memory
CrushedAsian255
2024-09-19 09:46:24
You mean basically just groups?
AccessViolation_
2024-09-19 09:46:33
Yeah
CrushedAsian255
2024-09-19 09:48:01
i converted using -e8 but it fails to decode.?
2024-09-19 09:48:06
``` JPEG XL decoder v0.11.0 0.11.0 [NEON] Failed to decode image Warning: could not decode losslessly to JPEG. Retrying with --pixels_to_jpeg... ```
_wb_
2024-09-19 09:54:10
Chunked encoding is currently only implemented when encoding from pixels, right <@179701849576833024> ?
veluca
2024-09-19 09:54:34
yup
_wb_
2024-09-19 09:55:12
Perhaps for sequential jpegs we could also do streaming input, but it seems a bit tricky
Demiurge
2024-09-19 10:30:07
what about jxl input? 🤔 It's already divided into groups with a table of contents that can be decoded in any order...
2024-09-19 10:30:22
seems pretty convenient
_wb_
2024-09-19 10:35:02
typically yes, but in the general case things can get messy when there's squeeze involved, or delta palette, or dc frames, etc.
2024-09-19 10:36:28
but I guess we could fall back to full-image when it gets too hard, and only do the chunked thing for the easy things like default lossless and default lossy
Demiurge
CrushedAsian255 this kind of thing is why a progress indicator would be helpful
2024-09-19 10:41:43
Is there a good place to read the api docs online aside from just browsing the header files?
2024-09-19 10:41:54
Oops, didn't mean to reply to that message.
2024-09-19 10:42:07
But it is kinda relevant.
CrushedAsian255
2024-09-19 10:43:24
There is a readthedocs
2024-09-19 10:43:24
Can’t remember the url but it’s somewhere
Demiurge
2024-09-19 10:48:05
libjxl supports progressive decoding, so I kind of assume it must have some kind of non-blocking, asynchronous polling api already? since that woudl be the most natural way to do that kind of thing
2024-09-19 10:48:35
doing that synchronously would be very obtuse
2024-09-19 10:48:47
I would imagine.
2024-09-19 10:49:31
Maybe there's already a progress object
2024-09-19 10:50:10
I wonder where the "official" api guide is.
Eugene Vert
2024-09-19 12:54:44
I've been experimenting with JXL animation, especially in terms of optimizing the difference between animation frames using JXL's ability to store multiple reference frames
2024-09-19 12:54:52
~~Unexpectedly it turned out that storing layers as crops rather than full frames, sometimes is less efficient both in terms of compression and decoding speed if layers is large enough~~ Edit: I've had a few times where full frame was more effective, but I cannot reproduce it anymore
2024-09-19 12:59:28
Splitting an animation frame with large empty regions into several (2-3) smaller layers, without empty regions, using cropping, turned out to be even worse for decoding performance, so at sizes close to 4K frames did not have enough time to decode and were skipped on Ryzen 5 5600X
Quackdoc
2024-09-19 01:09:30
0.0
_wb_
2024-09-19 01:26:00
sounds like there could be a performance bug for this case of cropped layers — I suspect it's not something we have been testing a lot
RaveSteel
AccessViolation_ https://wormhole.app/A1L45#7L1z0dVN2UypjBe_m2pIPQ
2024-09-19 08:08:40
I can't even open it despite having enough RAM. The image viewers I#ve tried just crash or show error messages
monad
2024-09-19 11:56:24
you don't have gimp?
RaveSteel
2024-09-20 12:09:44
Gimp just crashed
monad
2024-09-20 12:11:12
uh, okay
RaveSteel
2024-09-20 12:11:25
More interesting though: Gewnview and nomacs, both Qt-based showed the error message `JXL image (57813x48438) is bigger than security limit 256 megapixels` THis can probably be bypassed using an env var, though I'll have to look for it
CrushedAsian255
2024-09-20 12:11:41
probably capping at level5
monad
2024-09-20 12:12:32
that limit is general, not a jxl level thing
2024-09-20 12:13:22
xnview nearly gets there for me, but has some display glitching
2024-09-20 12:13:59
although my xnview has been behaving weird, i might just need to update
RaveSteel
2024-09-20 12:14:44
What is the best way to view large JXL files then? I could always decode, but that is a suboptimal workaround
CrushedAsian255
2024-09-20 12:15:33
once the cropped decode api is ready that can be used
RaveSteel
2024-09-20 12:16:07
Any idea when that'll be?
CrushedAsian255
2024-09-20 12:18:21
its on the road map
monad
RaveSteel More interesting though: Gewnview and nomacs, both Qt-based showed the error message `JXL image (57813x48438) is bigger than security limit 256 megapixels` THis can probably be bypassed using an env var, though I'll have to look for it
2024-09-20 12:18:53
wait, that limit is built into the jxl plugin
2024-09-20 12:19:17
i'm sure Qt generally fails on large images regardless
CrushedAsian255
2024-09-20 12:19:28
probably to prevent killing the ram
RaveSteel
2024-09-20 12:19:54
It does by default, but can be bypassed using the env var `QT_IMAGEIO_MAXALLOC=0`
2024-09-20 12:20:19
Which is why I assumed there would be something similar for the JXL limit
monad
2024-09-20 12:20:32
<https://github.com/novomesk/qt-jpegxl-image-plugin/blob/main/src/qjpegxlhandler.cpp#L204>
RaveSteel
2024-09-20 12:22:03
Same thing in kimageformats https://github.com/KDE/kimageformats/blob/master/src/imageformats/jxl.cpp#L220
2024-09-20 12:24:07
A fair limation, since images so large may lead to memory running out
monad
2024-09-20 12:27:01
well, while xnview and gimp both fully decoded the jpg (xnview using much less memory), nomacs just crashed my environment
RaveSteel
2024-09-20 12:27:57
If you have gwenview try `QT_IMAGEIO_MAXALLOC=0 gwenview The_Night_Watch_-_HD.jpg`
2024-09-20 12:28:42
The fully loaded image with gwenview takes around 12.5GB memory
jonnyawsom3
RaveSteel Any idea when that'll be?
2024-09-20 12:39:14
Oxide already has cropped decode, but naturally that only works for decoding to PNG currently, and last time I tried it didn't seem to make any difference in memory usage for some reason
CrushedAsian255
2024-09-20 05:31:24
can i use libjxl in a project if it's written in C++ but it's in C?
2024-09-20 05:31:32
as in it's C but it is C++
_wb_
2024-09-20 05:33:04
Sure
CrushedAsian255
2024-09-20 05:33:57
as in is libjxl in C or C++?
_wb_
2024-09-20 05:36:52
The API is made in C so you can use it from both C and C++
CrushedAsian255
2024-09-20 05:37:55
ok good
2024-09-20 05:37:56
thanks
Foxtrot
2024-09-20 06:46:02
Looks like this thing started moving again https://github.com/libjxl/jxl-rs I wonder how much can by just copy-pasted from jxl-oxide. For now I see container parser was used from that project.
yoochan
2024-09-20 07:08:06
Why not a fork of tirr's project?
veluca
2024-09-20 08:11:47
long story short, the work to minimize memory usage in jxl-oxide would be quite significant (I still have minor trauma from doing it in libjxl) and a rewrite would be about as much work if not less (except for things that *can* be re-used, which <@206628065147748352> has already started contributing :-))
Demiurge
2024-09-20 08:58:31
:)
AccessViolation_
2024-09-20 10:15:41
``` cjxl dune.png dune.jxl -d 0 ``` ``` JPEG XL encoder v0.11.0 0.11.0 [AVX2,SSE4,SSE2] Getting pixel data failed. ``` Any clue why this might happen when trying to convert this file?
2024-09-20 10:16:52
Using the verbose options didn't tell me anything else either
2024-09-20 10:19:30
This image seems to use a simple palette and has pixel-aligned letters great for patches, so I was really curious how well this one would compress, but unfortunately it fails
Smegas
AccessViolation_ ``` cjxl dune.png dune.jxl -d 0 ``` ``` JPEG XL encoder v0.11.0 0.11.0 [AVX2,SSE4,SSE2] Getting pixel data failed. ``` Any clue why this might happen when trying to convert this file?
2024-09-20 10:25:43
With ver 0.10.3 all go ok
2024-09-20 10:25:59
JPEG XL encoder v0.10.3 4a3b22d [AVX2,SSE2] Encoding [Modular, lossless, effort: 7] Compressed to 3178.5 kB (2.099 bpp). 2805 x 4318, 13.335 MP/s [13.34, 13.34], , 1 reps, 12 threads.
AccessViolation_
2024-09-20 10:27:43
Oh, okay. I should update
TheBigBadBoy - 𝙸𝚛
AccessViolation_ Oh, okay. I should update
2024-09-20 10:35:54
v0.10.3 is older than your version (v0.11.0)
AccessViolation_
2024-09-20 10:39:44
my god
2024-09-20 10:39:51
I misread that as 0.13.0
2024-09-20 10:39:55
it's late and I'm tired
Smegas
2024-09-20 10:58:24
I use XnView MP to make copy png file and this copy go ok in ver 0.11.0
2024-09-20 10:58:39
cjxl dune_copy.png dune.jxl -d 0 JPEG XL encoder v0.11.0 4df1e9e [AVX2,SSE2] Encoding [Modular, lossless, effort: 7] Compressed to 3141.7 kB (2.075 bpp). 2805 x 4318, 10.044 MP/s [10.04, 10.04], , 1 reps, 12 threads.
2024-09-20 11:03:27
BTW dune_copy.png is smaller 🙂
2024-09-20 11:03:45
What You use to make this png file?
monad
AccessViolation_ ``` cjxl dune.png dune.jxl -d 0 ``` ``` JPEG XL encoder v0.11.0 0.11.0 [AVX2,SSE4,SSE2] Getting pixel data failed. ``` Any clue why this might happen when trying to convert this file?
2024-09-21 02:46:42
``` lib/extras/dec/apng.cc:895: JXL_FAILURE: Exuberant input after IEND chunk lib/extras/dec/decode.cc:151: JXL_FAILURE: Codecs failed to decode```
Demiurge
2024-09-21 04:32:49
`vips jxlsave dune.png dune.jxl --lossless=true --effort=9`
monad ``` lib/extras/dec/apng.cc:895: JXL_FAILURE: Exuberant input after IEND chunk lib/extras/dec/decode.cc:151: JXL_FAILURE: Codecs failed to decode```
2024-09-21 04:33:44
Sounds like the png decoder is mad that there's extra stuff at the end of the file.
2024-09-21 04:33:57
Exuberant :)
2024-09-21 04:37:09
if you optimize the png with oxipng it also fixes the problem
2024-09-21 04:39:46
exiftool: ``` Bit Depth : 8 Color Type : RGB Compression : Deflate/Inflate Filter : Adaptive Interlace : Noninterlaced Warning : [minor] Trailer data after PNG IEND chunk Image Size : 2805x4318 Megapixels : 12.1 ```
2024-09-21 04:40:07
it just has some random data tacked onto the end
2024-09-21 04:40:55
here it is compressed with 0.11.0 effort 9
CrushedAsian255
2024-09-21 12:11:28
<@179701849576833024> continuing here from <#848189884614705192> [link](<https://discord.com/channels/794206087879852103/848189884614705192/1287023247577186405>) what exactly is the "derive macro"?
2024-09-21 12:11:47
i thought derive was for things like Debug and Clone
2024-09-21 12:12:01
for like default `impl`s
2024-09-21 12:12:13
is bitstream reading autogenerated using macros?
veluca
2024-09-21 12:12:20
yup
2024-09-21 12:12:23
well, for headers
CrushedAsian255
2024-09-21 12:12:50
is that permanent or just to get things done quickly?
veluca
2024-09-21 12:15:36
I'd say permanent
2024-09-21 12:15:45
there's no good reason to hand-craft those impls
CrushedAsian255
2024-09-21 12:16:54
just wondering is there any way to PR without a google account, as my google account is linked to my IRL identity
2024-09-21 12:17:07
also am planning to delete my google account as i never use it
2024-09-21 12:17:35
or should i make a seperate account just for JPEG XL
dogelition
CrushedAsian255 just wondering is there any way to PR without a google account, as my google account is linked to my IRL identity
2024-09-21 01:18:42
when you sign the CLA, you just enter your github username, and i *think* the link between your google account and github account isn't public
CrushedAsian255
2024-09-21 01:19:27
As in the thing with my GitHub username and those numbers?
2024-09-21 01:19:41
> isn’t public Can someone confirm this?
dogelition
CrushedAsian255 As in the thing with my GitHub username and those numbers?
2024-09-21 01:20:17
you can use that github noreply email for the commit, and the bot looks up the signed CLA just from your github username
AccessViolation_
Smegas What You use to make this png file?
2024-09-21 01:31:08
I didn't make it myself, I got it from a Dune forum. It caught my eye because all text was pixel aligned which seemed like the perfect situation for the patches feature
2024-09-21 01:32:22
I plan on making a JPEG XL inspector tool to for example see where patches are used so this seemed like a great test image for that
monad ``` lib/extras/dec/apng.cc:895: JXL_FAILURE: Exuberant input after IEND chunk lib/extras/dec/decode.cc:151: JXL_FAILURE: Codecs failed to decode```
2024-09-21 01:49:14
Thanks, I'm able to use this file :)
qdwang
2024-09-25 03:35:17
Hi guys, I failed to compile libjxl v0.11.0 for iOS. ``` ... -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - no -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - not found CMake Error at /opt/homebrew/Cellar/cmake/3.30.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:233 (message): Could NOT find Threads (missing: Threads_FOUND) Call Stack (most recent call first): /opt/homebrew/Cellar/cmake/3.30.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE) /opt/homebrew/Cellar/cmake/3.30.2/share/cmake/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:244 (find_package) ``` But the same compile command works for v0.10.3 ``` cmake ../ \ -D CMAKE_BUILD_TYPE=Release \ -D CMAKE_SYSTEM_NAME=iOS \ -D CMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" \ -D CMAKE_OSX_DEPLOYMENT_TARGET="16.0" \ -D BUILD_TESTING=OFF \ -D BUILD_SHARED_LIBS=OFF \ -D JPEGXL_ENABLE_DEVTOOLS=OFF \ -D JPEGXL_ENABLE_TOOLS=OFF \ -D JPEGXL_ENABLE_DOXYGEN=OFF \ -D JPEGXL_ENABLE_MANPAGES=OFF \ -D JPEGXL_ENABLE_BENCHMARK=OFF \ -D JPEGXL_ENABLE_EXAMPLES=OFF \ -D BROTLI_BUNDLED_MODE=ON \ -D JPEGXL_STATIC=ON \ -D ENABLE_JPEGLI_DEFAULT=ON ```
tufty
2024-09-25 09:05:04
hello, libvips dev here, I'm looking at large image support (again) these are eg. slide images and are typically 50,000 x 50,000 pixels to 300,000 x 300,000 pixels (!!)
2024-09-25 09:05:40
libjxl won't work well for monsters like this, you really need a tiled mode, with perhaps 512 x 512 pixels in a tile
2024-09-25 09:06:11
libtiff has a tag set aside for JXL compression, so tiled tiff with JXL tiles seems the best current solution
2024-09-25 09:07:14
does anyone have any thoughts on this? what should I write for each tile? just a libjxl image with as little metadata as possible? (since metadata should be in the enclosing TIFF file)
2024-09-25 09:07:54
what would a good tilesize be? somewhere between 512 x 512 and 2048 x 2048 I suppose?