Live data from Hacker News

What’s the best lossless image format?

siipo.la

41–50 of 166 posts

Re: What’s the best lossless image format?

#41

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.

JPEG XL bitstreams always have a defined color space, optionally described by an embeded ICC profile. They are a part of bitstreams instead of containers [1] because they are considered necessary to reproduce the exact output. When converting from file formats with an ambiguous color space (e.g. PNG without color space information) cjxl assumes sRGB as far as I know; you can give any display color space to djxl.

[1] A JPEG XL file can be a minimal bitstream or an ISOBMFF container, where the latter can contain the actual bitstream and additional metadata like Exif. The bitstream itself should be enough for decoding.

Re: What’s the best lossless image format?

#43

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

Quite, and encoding speed, which is included, seems almost irrelevant

Why is encoding speed irrelevant?

I'm currently in the process of scanning and archiving lots of photographs as high-resolution 16-bit PNG's and encoding speed is definitely a significant influence on how long this process takes.

Re: What’s the best lossless image format?

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

JPEG XL is a different technology than the original JPEG format. (JPEG is also the name of the organization that contributed to both formats.) JPEG legacy's patent expired in 2006 although lawsuits continued afterward. JPEG XL is royalty free.

Re: What’s the best lossless image format?

#45

Earlier quoted context omitted.

Quite, and encoding speed, which is included, seems almost irrelevant

Why is encoding speed irrelevant? I'm currently in the process of scanning and archiving lots of photographs as high-resolution 16-bit PNG's and encoding speed is definitely a significant influence on how long this process takes.

Because it's a one-time cost and you can cheaply throw more CPU power at the problem, or just wait and then you're done.

If you're doing this at such a scale that encoding speed matters (like if you're Instagram) the major concern would likely be cost, which you're going to save in bandwidth every time an image is viewed.

Re: What’s the best lossless image format?

#47
post #45

Earlier quoted context omitted.

Why is encoding speed irrelevant? I'm currently in the process of scanning and archiving lots of photographs as high-resolution 16-bit PNG's and encoding speed is definitely a significant influence on how long this process takes.

Because it's a one-time cost and you can cheaply throw more CPU power at the problem, or just wait and then you're done. If you're doing this at such a scale that encoding speed matters (like if you're Instagram) the major concern would likely be cost, which you're going to save in bandwidth every time an image is viewed.

"you can cheaply throw more CPU power at the problem, or just wait and then you're done"

How am I going to "throw more CPU power at the problem" when I'm using a scanner hooked up to my laptop? Should I buy myself a new, more powerful laptop? That doesn't sound cheap.

As for "just" waiting... my time is valuable, and I have better things to do with it than wait... and, unfortunately, the process of scanning and encoding needs a lot of babysitting from me, so I can't just dump a bunch of photos in my scanner and come back when it's all over if I want even half-decent results, not to mention archival quality images.

In this real-world scenario, a quicker encoding speed would save me a lot of valuable time, and there's no getting around it short of hiring a skilled and trusted person to do it for me.

Re: What’s the best lossless image format?

#48

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 does it relate to JPEG2000?

I may soon have to recommend a lossy but potentially lossless image format for 3D medical images (with 16 bits channels), would JPEG XL fit this bill?

Re: What’s the best lossless image format?

#49
If you want something that is going to be around for awhile and has a LOT of features you probably do not need then you are going to want to go probably with a .DPX or .EXR which are the standard for the VFX industry as well as film in general. On the consumer side I guess adobe .DNG might not be bad either or for maximum compatibility but then maybe a Tiff.

For video I personally like Cineform but both ProRes and DNxHD are more widely used

EXR will get you full 32 bit float if needed

Re: What’s the best lossless image format?

#50
post #48

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 does it relate to JPEG2000? I may soon have to recommend a lossy but potentially lossless image format for 3D medical images (with 16 bits channels), would JPEG XL fit this bill?

The future isn't here yet unfortunately.

I imagine the doctors would view these images in multitudes of ways(browsers, operating systems, image viewers) with varying level of support. So encoding in a standard that is yet to be entirely finalized and adopted is a bad move as of now.

You'd be best off with going with JPEG2000 still if that's what you prefer or DICOM.

Post reply on HN