Live data from Hacker News

What’s the best lossless image format?

siipo.la

81–90 of 166 posts

Re: What’s the best lossless image format?

#81
post #38

Earlier quoted context omitted.

Everything about JPEG XL sounds great, except that it takes about 34 times longer to encode an image compared to PNG. Edit: Apparently there's an experimental faster version: https://github.com/libjxl/libjxl/tree/main/experimental/fast...

If it takes that much longer to encode then I am guessing it takes a lot longer to decode as well which I am going to guess makes it completely out for image sequences, film archiving, VFX work, high end photography, etc etc.

That is usually not true.

The time spent by high quality encoders is generally trying different settings to find optimals... decoding should be unaffected.

Re: What’s the best lossless image format?

#82
post #69

Earlier quoted context omitted.

How do EXR and JXL compare to each other, feature-wise?

I have never used JXL honestly - no job I have had it was ever even considered. Given the Jpeg in the name I doubt any pro studio would consider it given the other options do everything needed. DPX is basically the older standard for film and EXR is the newer one. edit: Just looked at the specs and JpegXL is definitely marketed at least more as a web end viewing file type. It does higher color depths (up to 16 bit) w…

JPEG XL definitely supports 32-bit float samples, but cjxl is currently unable to read a 32-bit EXR [1] (compare with PFM [2] which is fully supported).

[1] https://github.com/libjxl/libjxl/issues/465

[2] http://www.pauldebevec.com/Research/HDR/PFM/

Re: What’s the best lossless image format?

#83

I think decompression times would be a relevant criteria, but they're surprisingly not there...

Yes please. Bandwidth is relatively cheap, when do we start optimising for compute instead? Would be great to have some kind of metric that would allow us to better understand efficiency (e.g. effort/energy/time) for the use-span of a given image.

... something that might tell us, given a 3s encode with available technology, at what number of over-the-wire loads / decodes does it become more efficient to use a cheaper codec? Slightly less relevant with lossless, but still.

Re: What’s the best lossless image format?

#85

JPEG XL is the standard to beat them all. Like how Opus became the definitive codec for lossy compression for the web. JPEG XL covers nearly every use case for images, even replacing GIFs with it's animation support. Existing JPEGs can also be re-encoded losslessly into JPEG XL format/data structure and get significant file size savings. This backwards compatiability is very important in transitioning to web to JPEG…

Yeah, but what is the file extension?

If it is .jpx, maybe.

Otherwise, no.

(Only partially kidding, unfortunately. Outcomes sometimes hinge on trivial details.)

Re: What’s the best lossless image format?

#86

Earlier quoted context omitted.

I have never used JXL honestly - no job I have had it was ever even considered. Given the Jpeg in the name I doubt any pro studio would consider it given the other options do everything needed. DPX is basically the older standard for film and EXR is the newer one. edit: Just looked at the specs and JpegXL is definitely marketed at least more as a web end viewing file type. It does higher color depths (up to 16 bit) w…

JPEG XL definitely supports 32-bit float samples, but cjxl is currently unable to read a 32-bit EXR [1] (compare with PFM [2] which is fully supported). [1] https://github.com/libjxl/libjxl/issues/465 [2] http://www.pauldebevec.com/Research/HDR/PFM/

Got it. Well that is good at least.

Realistically I can see JPEGXL becoming a good DELIVERY format but I highly doubt any industries will be swapping to it for production use (or archiving) given there are very widely adopted formats and standards already that can do the same thing.

I'm almost tempted to say that trying to make ONE format that is meant for both (delivery and production or archiving which are inherently opposites in terms of requirements) is a bad idea just from a marketing and ease of use standpoint. Sometimes its nice to have two clearly separate technologies meant specifically for their purpose.

Re: What’s the best lossless image format?

#87
post #26

Earlier quoted context omitted.

You cannot calculate Kolmogorov complexity in all cases because that would involve solving the halting problem. It is worth pointing out that certain formats like AVIF do sort of do this: they use a few different algorithms, see which combination of algo/block split removes the most entropy, and then compress _that_. In practice, this is pretty good for most non-noisy images.

Wouldn’t you want entropy to increase when you compress?

Entropy can be considered on a per-byte or per message basis, and it seems that people who are talking about data at rest (compressed pictures, archives, etc) almost always talk about the per-message numbers. I don't think I've ever seen Kolmogorov complexity applied to a bitstream. It's always been per message.

In which case entropy is exactly conserved, unless the encoding is lossy.

Re: What’s the best lossless image format?

#88

JPEG XL is the standard to beat them all. Like how Opus became the definitive codec for lossy compression for the web. JPEG XL covers nearly every use case for images, even replacing GIFs with it's animation support. Existing JPEGs can also be re-encoded losslessly into JPEG XL format/data structure and get significant file size savings. This backwards compatiability is very important in transitioning to web to JPEG…

> Without a doubt 5 years now JPEG XL will become like Opus and set the standard for next generation image formats. I wrote a little X11 screenshot tool last year; one of the reasons I wrote it is because I wanted to save images as WebP rather than PNG that most tools use, since it's quite a bit smaller. Not that I'm running out of disk space, but it just seemed nice; one of those "no, it's not really needed but it's…

You could make a similar case for audio. GP described Opus as "the definitive codec for lossy compression", which made me do a bit of a double take. Opus is absolutely the technically superior audio format, but when you want to give users a file you'll be sure they can play, you give them an MP3.

I expect JPEG and PNG to become for images what MP3 is today. And I expect H.264 to become that for video. These formats are too ingrained, whatever their technical limitations.

Technologists consistently underestimate the power of backwards compatibility. Itanium was better than AMD64, DVORAK is better than QWERTY, and I'm sure Esperanto is lightyears ahead of the monstrosity that is English. But backwards compatibility always wins, because it fits what the world was already designed around.

-----

(To be fair to GP, they said Opus is the definitive choice for the web, which may be true for integrated in-browser playback. But in other contexts, well, Amazon sells MP3s, not Opus files.)

Re: What’s the best lossless image format?

#89
post #38

Earlier quoted context omitted.

Everything about JPEG XL sounds great, except that it takes about 34 times longer to encode an image compared to PNG. Edit: Apparently there's an experimental faster version: https://github.com/libjxl/libjxl/tree/main/experimental/fast...

If it takes that much longer to encode then I am guessing it takes a lot longer to decode as well which I am going to guess makes it completely out for image sequences, film archiving, VFX work, high end photography, etc etc.

It may take less time actually since it can be parallelized. PNG's big problem is it's serial.

Re: What’s the best lossless image format?

#90
post #17

For web graphics, isn't a mix of PNG/JPEG good enough generally speaking? I'd imagine the benefits of changing to something more modern/efficient aren't worth the cost/time involved other than in esoteric situations given that most end users have high bandwidth connections and bandwidth costs typically aren't too significant?

You might want to check your pagespeed insights to verify that. I noticed that our pagespeed score was very poor (due to google using new methods to calculate those scores). Adding webp versions of images reduced the size of those images significantly, and brought our pagespeed scores back to more reasonable values in google's eyes.
Post reply on HN