Re:The case against JPEG XL
by doodlesdev on Monday September 14, 2026 @01:59AM
(#49692554)
I knew about the lossless JPEG to JPEG XL compression story before, but had no idea that it was a two-way road. That's truly f* impressive. Boggles my mind even more the fact this format hasn't been adopted widely yet.
[ Parent
| on HN ]
Re:The case against JPEG XL
by magicalhippo on Monday September 14, 2026 @02:16AM
(#49692652)
JPEG is a lossy frequency-space compression stage followed by a lossless Huffman coding stage. The second stage is quite generic as such, essentially compressing a stream of bits.
So you can relatively easily replace the second stage with something better. And since it's lossless you can easily go back.
Dropbox[1] and others have exploited this for reducing storage requirements, converting back on-demand so the client doesn't notice.
Re:The case against JPEG XL
by jaffathecake on Monday September 14, 2026 @04:05AM
(#49693472)
Because what you save in terms of storage, you pay for in decode time, which is an important consideration on the web.
Re:The case against JPEG XL
by doodlesdev on Monday September 14, 2026 @07:14AM
(#49694972)
I guess my surprise is mostly that it hasn't been adopted elsewhere. For instance, it still boggles my mind I can't store my JPEG XL images on Google Photos nor take photos as JPEG XL images directly on my Samsung smartphone, but can use HEIC for some fruity reason.
Re:The case against JPEG XL
by jaffathecake on Monday September 14, 2026 @07:23AM
(#49695039)
The DoS thing would certainly make me worry about handling these images on my server.
Re:The case against JPEG XL
by Broiler9437 on Tuesday September 15, 2026 @10:50AM
(#49713443)
Google Photo teams wanted JXL too, but had to hold back due to Chromium not supporting them
Re:The case against JPEG XL
by spider-mario on Monday September 14, 2026 @08:12AM
(#49695541)
Do you? I just tried it locally, and decoding a 4.9MB, 6000×4000 JPEG with djpeg took about 400ms; decoding its losslessly-recompressed JXL (4.15MB) single-threaded took 300ms.
Re:The case against JPEG XL
by jaffathecake on Monday September 14, 2026 @08:57AM
(#49696074)
Cool. You're getting different results to everyone else. Do you see the same on https://random-stuff.jakearchibald.com/apps/img-decode-bench... (make sure you use a browser that supports JPEG XL)?
Re:The case against JPEG XL
by spider-mario on Monday September 14, 2026 @09:36AM
(#49696663)
Well, I said “with djxl”, and Chrome/Firefox use jxl-rs which happens to apparently be currently somewhat slower for that use-case (but libjxl being faster shows it doesn’t have to intrinsically be the case), and Safari uses libjxl but multithreaded (so it’s 800 ms for the JPEG and 137 ms for the JXL).
Re:The case against JPEG XL
by jaffathecake on Monday September 14, 2026 @09:47AM
(#49696828)
That's fair, at really high resolution, the JXL decoders in browsers do better than JPEG decoders. I'm pretty sure this is a weakness in the JPEG decoder rather than the format, but it's still a meaningful result.
At smaller sizes (more typical on the web), the results are opposite, the JPEG decodes much faster.
jxl-rs will presumably get much faster in time. The work on it started much later than work on libjxl (because it took years for anyone to say they had vested interest in it), and if my understanding is correct, it hasn’t been production-ready until recently. Once it behaves correctly, speed improvements are next in line, presumably.
There is indeed an issue with the JPEG format that makes parallelization difficult: the lack of a 'table of contents' with offsets to tiles.
Various workarounds (for example RST markers or self-sychronizing properties of Huffman) have been proposed, but these are not great and do not work for all images.
JPEG XL ensures this information is always available.
You pay for decoding only when you view the image, whereas storage is a persistent cost.
Re:The case against JPEG XL
by jbverschoor on Monday September 14, 2026 @03:29AM
(#49693171)
byte-for-byte identical file actually. Not just imagery. You can basically save 30% without loosing ANY bit of the original file