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

Currently libjxl doesn't render `lqip`,

Jashka
Currently libjxl doesn't render `lqip`, which means <#1065165415598272582> might work a lot better. Like I mentioned before, we've gotten 'images' at only 0.15% with it https://discord.com/channels/794206087879852103/794206170445119489/1285250134875176992, so even just a few percent would probably be enough, assuming they're encoded with `--progressive_dc=1` (can't recall the earliest without). The decoded output will also be at full resolution, upsampled from 1:8 (or less) since there's no API for it yet, but it was discussed before
2024-10-31 10:27:54
2024-10-31 10:27:55
jxl-oxide works quite nicely with the --allow_partial_files option. For small (~64kB) JXL images I'm personally not able to get anything less than 50% of the original size to be decoded, I'm assuming the lowest quality layer will always be some 20-30kB at least, regardless of full image size?
jonnyawsom3
2024-10-31 10:33:25
I don't recall my results from testing a few months ago, but it might be easier just sending the first 30kB of files via a 206 partial content http request. It's the same method used to buffer videos without loading the entire file
Jashka
2024-10-31 10:53:01
Alright. This is a project with high power usage constraints so we want to send the least amount of bytes for the thumbnail/preview. I'm assuming there's a concrete number of bytes that compose the minimum preview image, but currently the libjxl encoder does not in any way output this number? Will have to look into modifying the source.
jonnyawsom3
2024-10-31 10:59:22
`jxl-oxide -I --all-frames --with-offset` will tell you the position of the different components inside the JXL file. If I recall, LFGlobal is the minimum needed to preview
2024-10-31 11:01:30
An idea previously discussed was making an index listing preview sizes for the server to reference when the file is requested, if you don't mind some extra work server side
Jashka
2024-10-31 11:04:57
🤦‍♂️ I was using libjxl tools instead of jxl-oxide. Ofc ofc. That command helps a lot! Thanks for the lead.
jonnyawsom3
2024-10-31 11:06:21
There's a lot of promise with the format, but right now you need to know how to coax it into doing what you want haha
2024-10-31 01:58:17
<@306129091931668483> Something I didn't mention is the Table Of Contents, which does include the LFGlobal and it's size in the header of the file. But I think you need to decode the header yourself if you want to use it currently, hence pointing at Oxide first
2024-10-31 02:10:45
F.3 in the spec, which you can find a draft version of here https://discord.com/channels/794206087879852103/1021189485960114198/1256224842894540831
Demiurge
2024-11-01 04:15:13
Isn't there a way to ask libjxl for the lqip?