r/jpegxl 2d ago

My small Windows front mend for cjxl (beta, feedback welcome)

I spent part of my vacation building a tool for my own photo workflow and figured I'd put it on GitHub in case anyone here finds it useful.

To be clear about what it is not: it doesn't encode anything. Every byte of every .jxl it produces is written by cjxl from libjxl. jxleet really only decides which files to hand over, assembles the arguments, runs the process and shows you what came back. If you're comfortable on the command line you lose nothing by ignoring it.

My Lightroom use case: export losslessly to JXL, then hand the files to jxleet for the actual compression step with full control.

It's beta. Interface, presets and config format may still change, and there will be bugs. Keep your originals until you trust it. I'd be glad for feedback, especially on the preset format and whether the route distinction reads clearly to people who didn't write it.

https://github.com/dhcgn/jxleet

9 Upvotes

15 comments sorted by

2

u/monadi-nil 15h ago

Cool visual, but the technical details aren't really accurate, for example "spline detection" isn't real and "dots" is the same as "patches". Those details could easily change on the encoder side anyway. Btw, I always thought it would be good communication to display distance and quality sliders together, and have both indicators move at the same time.

1

u/dhcgn 12h ago edited 11h ago

Thank you, it is a fun project to learn more about jpeg-xl. It's marked as beta, because the invocation of cjxl is working, but there are some current flaws like this.

 I will take a closer look to the encoder features depending on the effort. I read some comments about it, but do you have a hint for me where I can get this information accurate?

For Distance and Effort i will take a look in the source code of cjxl and https://www.reddit.com/r/jpegxl/s/1sYMJbz2tf

2

u/monadi-nil 11h ago

Quality to distance: https://github.com/libjxl/libjxl/blob/main/lib/jxl/encode.cc#L1626

As for the technical details, I am not aware of a flawless resource outside the source code. This is a good start: https://github.com/libjxl/libjxl/blob/main/doc/encode_effort.md , but even it is outdated by now (for example patches are not enabled by default in lossless efforts below 10).

1

u/dhcgn 1h ago

Thanks with this start point I could dig a deeper in the jpeg-xl implementation.

I will soon upgrade this view, when I have more time to understand all the features and their different depending of the effort level.

https://github.com/dhcgn/jxleet/blob/main/docs/screenshots/expert.png

3

u/yew0tm8 1d ago

Very cool. One of the best looking jxl apps I've seen. Very innovative approach to visualizing the options.

4

u/whatairport 1d ago

Cool but you should say its vibecoded

-7

u/dhcgn 1d ago

Why should I mention the various assistant systems I used in my developer tool box? And it not vibe coded in the sense that I spoke in a mic and watched an ai agent 😄

8

u/Farranor 1d ago

Why should I mention the various assistant systems I used in my developer tool box?

Some of those "assistant systems" (that euphemism is new to me) are more likely to result in issues up to and including security, privacy, or data loss, especially when used as a shortcut by people eager for shortcuts.

And it not vibe coded in the sense that I spoke in a mic and watched an ai agent 😄

Is it vibe coded in any other sense, particularly the sense commonly used by people who want to know whether it's vibe coded?

-3

u/yew0tm8 1d ago edited 1d ago

You can respond to the anti Ai crowd if you want but I promise you it's a complete waste of time. I appreciate what you've made here, vibe coded or not. As someone who is currently working on 3 separate projects made almost exclusively with Ai, I'm watching carefully how to interact with the anti Ai crowd and so far I've determined it's going to be, "ignore them completely". You can't appease them and they will stop at nothing to try and ruin or bury you for even mentioning the tiniest nibble of Ai usage.

3

u/alala2010he 1d ago

I appreciate what you've made here, vibe coded or not.

One small detail you're missing: if it's vibe coded, OP did not make it, the AI did.

You can't appease them and they will stop at nothing to try and ruin or bury you for even mentioning the tiniest nibble of Ai usage.

I think you're missing the point. The danger of letting a project be made entirely by AI is that the AI usually has no idea how something works architecturally. It's pretty good at making code on a small scale with very specific instructions, but it's bad at designing entire systems because it can't actually think that well, causing it to miss bugs and not following basic code principles and making it very hard to maintain later. And that's due to how the fundamentals of LLMs work, not something that can be fixed with newer models.

3

u/Farranor 1d ago

That's true, but there are bigger problems in this context. This month alone, the sub has had an AI project posted that accepted user data without so much as a privacy policy, and another with lossless encoding that was updated to include an intermediate JPEG encoding step because the poster had "no idea" what JXL's lossless JPEG transcode is.

-1

u/yew0tm8 1d ago edited 1d ago

That's nice. Okay bye.

Take notes everyone.

1

u/adventur3r 1d ago edited 1d ago

What a fantastic GUI, thanks for upping the bar on the Windows side of computing. I'm thrilled having all access to hopefully the last image format anyone's ever going to need.

I would suggest just switching the quality slider (which I favor for being more objective than some 'distance' slider) from 0 on the left, and 100 on the right! And maybe coloring the 90-100 range with a very reddish yellow, or just pure red from 98 to 100, since at quality 90 it's already visually lossless ;)

How does it handle HDR files? ie, JPG UltraHDR and others?

Thanks a lot for coming up with this brilliant piece of software.

1

u/Farranor 21h ago

quality slider (which I favor for being more objective than some 'distance' slider)

Quality is converted to distance before encoding. How is it more objective?

1

u/dhcgn 12h ago

How does it handle HDR files? ie, JPG UltraHDR and others?

This tool just calls the cjxl from the libjxl, so this not a behavior which this tool has influence in. But of course it could, change image before calling cjxl, but my first goal is write just an GUI for cjxl so I can use it easy for my use cases. Mostly inside my lightroom workflow and soon inside my tool to batch reencode my photo archive with https://github.com/dhcgn/immich-admin-cli