Live data from Hacker News

What’s the best lossless image format?

siipo.la

31–40 of 166 posts

Re: What’s the best lossless image format?

#31
The best lossless format is the one you can decode back to the original image. When evaluating them, there is an implicit assumption that the decode step will happen a short time later, but that's not always true. Will there be JPEG XL decoders commonly available in 40 years? Will the code even compile then? As a thought experiment, try to find the lossless encodings from 40 years ago and see if they can be faithfully reproduced. (or even 20 years ago, remember JPEG2000?)

Framing best in terms of file size or encoding speed is a really use-specific framing, and not ideal for preservation.

Re: What’s the best lossless image format?

#32

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…

Also ticks the HDR box!

As I comment elsewhere[1] it also has an experimental fast mode in tree that is crazy fast, using AVX2, NEON, or fallback.

Hopefully Microsoft patenting the thing someone else invented (ANS)[2] doesn't gum this all up.

[1] https://news.ycombinator.com/item?id=31658871

[2] https://news.ycombinator.com/item?id=31657383

Re: What’s the best lossless image format?

#33

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…

Does lossless JPEG XL support 16-bit images?

JPEG XL supports 24-bit integers/32-bit floats per channel.

Re: What’s the best lossless image format?

#34

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…

Isn't JPEG patent-encumbered technology?

Re: What’s the best lossless image format?

#35

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…

Does lossless JPEG XL support 16-bit images?

I gave cjxl a 16-bit depth PNG, told it to use lossless encoding, and it gave me a 16-bit depth JXL. Seems so.

Re: What’s the best lossless image format?

#36

The best lossless format is the one you can decode back to the original image. When evaluating them, there is an implicit assumption that the decode step will happen a short time later, but that's not always true. Will there be JPEG XL decoders commonly available in 40 years? Will the code even compile then? As a thought experiment, try to find the lossless encodings from 40 years ago and see if they can be faithfull…

This seems excessively handwringing about code rot. TIFF was introduced 35 years ago and still well supported. JPEG2000 didn't become super widespread, but is still used in many places. Smart passports encode your passport photo in JPEG2000 for example.

Re: What’s the best lossless image format?

#37

The best lossless format is the one you can decode back to the original image. When evaluating them, there is an implicit assumption that the decode step will happen a short time later, but that's not always true. Will there be JPEG XL decoders commonly available in 40 years? Will the code even compile then? As a thought experiment, try to find the lossless encodings from 40 years ago and see if they can be faithfull…

Your concern is valid but misplaced, there is a reason that we have standards after all. The Library of Congress maintains file format evaluations for the purpose of preservation, and there is an (pretty favorable) entry for JPEG XL [1] as well. Not yet in public, but I'm also working on the very first reimplementation of JPEG XL from scratch and reporting any spec bugs from ISO/IEC 18181 (there are plenty!) and I expect there would be more implementations in the future.

[1] https://www.loc.gov/preservation/digital/formats/fdd/fdd0005...

Re: What’s the best lossless image format?

#38

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…

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...

Re: What’s the best lossless image format?

#39
post #16

If your dataset allows it, I would look at pngquant for "lossy" compression of PNG images by means of color quantization: https://pngquant.org/ This works absolute wonders if you are talking about images with a limited amount of colors and without many gradients. I use it to compress screenshots of websites, which, if you think about it, are mostly large blobs of uniform colors with hard edges. I also use it every ti…

Still hoping for vector desktop screenshots, now that modern GUIs are all vector-based.* 11 years on, gtk-vector-screenshot still stands alone, though we do now have a handful tools for rendering webpages to SVGs.

*Add this to Category:Articles_with_obsolete_information: https://en.wikipedia.org/wiki/Vector-based_graphical_user_in...

Re: What’s the best lossless image format?

#40

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…

How well does JPEG XL deal with color spaces? I don't know much about them, but understand that not all color spaces are create equal, and data gets lost in conversions.
Post reply on HN