Live data from Hacker News

What’s the best lossless image format?

siipo.la

11–20 of 166 posts

Re: What’s the best lossless image format?

#11
post #7

There is also a new experimental Fast Lossless mode in JPEG XL as well, but it was developed after this post was written https://github.com/libjxl/libjxl/tree/main/experimental/fast...

> but it was developed after this post was written

The article literally compares it to others. It might not have been finalized at the time of writing, but it's not like the author was unaware of it.

Re: What’s the best lossless image format?

#13
post #10

> What is the best lossless image format? For which application? Otherwise you can only say " depends ". Tiff is good if you want to save data fast to disk in Blender. EXR is great if you want 32bit color depth, etc.

> For which application?

For this article the context is for use in browsers, and the main metric being measured is compression ratio.

Re: What’s the best lossless image format?

#14
post #8

I would love to see an estimation of how small real world images would get if we could calculate their Kolmogorov complexity. Aka if we could find the shortest program that produces the image as output. Some images obviously would become very small. For example an image that is all blue, a spiral, the flag of the United States, the Mandelbrot set ... But what about the average portrait for example?

Yes I’ve often thought of this too. Also a lot of images are screenshots of text or UIs.

Re: What’s the best lossless image format?

#15
post #11
post #7

There is also a new experimental Fast Lossless mode in JPEG XL as well, but it was developed after this post was written https://github.com/libjxl/libjxl/tree/main/experimental/fast...

> but it was developed after this post was written The article literally compares it to others. It might not have been finalized at the time of writing, but it's not like the author was unaware of it.

I think you misunderstand pizza; the article compares JPEG XL, but it doesn't compare the new lossless coder implementation (fjxl/fast_lossless), which is a separate tool/binary from cjxl.

Re: What’s the best lossless image format?

#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 time I want to include a screenshot from my desktop in some publication or email. The savings in filesize are too good to be true without any apparent loss of visual fidelity.

Re: What’s the best lossless image format?

#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?

Re: What’s the best lossless image format?

#18
post #10

> What is the best lossless image format? For which application? Otherwise you can only say " depends ". Tiff is good if you want to save data fast to disk in Blender. EXR is great if you want 32bit color depth, etc.

> Tiff is good

Mind that TIFF is only a container format that can contain any arbitrary codec you like; it can be uncompressed pixels, RLE compressed, it can be a PNG, a JPEG XL, even lossy JPEG or WebP if you'd like.

Saying your image format is TIFF is roughly as useful and conveys as much information as saying your video format is MKV.

Re: What’s the best lossless image format?

#19
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?

webp, webp2, and avif are absolutely worth using in modern web scenarios. It's even considered "poor practice" to serve legacy formats now.

Re: What’s the best lossless image format?

#20
post #18
post #10

> What is the best lossless image format? For which application? Otherwise you can only say " depends ". Tiff is good if you want to save data fast to disk in Blender. EXR is great if you want 32bit color depth, etc.

> Tiff is good Mind that TIFF is only a container format that can contain any arbitrary codec you like; it can be uncompressed pixels, RLE compressed, it can be a PNG, a JPEG XL, even lossy JPEG or WebP if you'd like. Saying your image format is TIFF is roughly as useful and conveys as much information as saying your video format is MKV.

In that regard lzw has been the standard lossless tiff compression format I’ve seen.
Post reply on HN