Live data from Hacker News

FLIF – Free Lossless Image Format

flif.info

231–240 of 254 posts

Re: FLIF – Free Lossless Image Format

#231
post #99

Earlier quoted context omitted.

I was a fan/proponent of that! Whatever happened to wavelet compression?

Patents.

Most of them had expired. Wavelet is something that looks good in theory but in practice couldn't beat the millions man hours work put into standard DCT.

Re: FLIF – Free Lossless Image Format

#232
post #77

I wonder how it compares with simply LZMA'ing (i.e. 7zip) a BMP. In my experience that has always been significantly smaller than PNG (which is itself a low bar --- deflate/zlib is a simple LZ+Huffman variant which is nowhere near the top of general-purpose lossless compression algorithms.) Along the same lines, I suspect BMP+LZMA would likely be beaten by BMP+PPM or BMP+PAQ, the current extreme in general-purpose co…

Do you have any examples of zipped bmp's compared to png. Seem strange if that was indeed better.

It shouldn't be that surprising. PNG has a maximum window size of 32KB. That means you could use a small set of identical tiles to make an image, and PNG would have to store a new copy every row, because the previous row is out of range.

Re: FLIF – Free Lossless Image Format

#233

Earlier quoted context omitted.

Why would the lack of a progressive mode matter? How is a progressive mode better than a "loading..." spinner?

Imagine this: you set your browser to download only the first N bytes of each image, showing you a decent preview. If you want more detail on a particular image, you tap it, and the browser requests the next N bytes (or the rest of the file, if you prefer). And to enable this, the site only needed to create one high-resolution image. Seems like a victory for loading speeds, for low-bandwidth, and for content creation…

Agreed, but is it likely? Does any browser implement the even simpler feature "Show a placeholder for images. Tap the placeholder to load the actual image"?

Re: FLIF – Free Lossless Image Format

#234

Earlier quoted context omitted.

Not even the most restrictive copyleft license hampers evaluation. You are literally free to do whatever you want with the program on your own hardware. Its only when you start redistributing that the license kicks in.

What degree of rewriting would be necessary to neutralize the LGPLv3 license restrictions? Would I be sued if I used the same logic flow but handcrafted every statement from a flow diagram generated from the source code? If I study the source and then make a single change to my own algorithm to incorporate the secret sauce in order to test its efficacy using my existing test suites, have I infected my own codebase wi…

Your question makes no sense. If a license is so restrictive to you that you can’t deploy it to testers, why would you be wanting to evaluate it in the first place?

If you’re not distributing the result to other people, literally nothing you described matters at all.

As for integrating ideas, as long as you don’t copy actual lines of code, simply learning ideas and techniques from any OSS doesn’t cause license infection.

That’s not evaluating a codec though, is it? You’ve gone far beyond the scope of this thread.

Re: FLIF – Free Lossless Image Format

#235
post #212
post #141

Earlier quoted context omitted.

Fair enough. Nonetheless, a lossy compression algorithm by definition produces fewer possible outputs than possible inputs. A lossless compression algorithm, again by definition, produces exactly as many different outputs as there are possible inputs. Therefore, on average, unless the lossless algorithm has a perverse encoding that uses more bits than necessary to encode the possible outputs, no lossless algorithm ca…

> Therefore, on average, unless the lossless algorithm has a perverse encoding that uses more bits than necessary to encode the possible outputs, no lossless algorithm can beat it on average I think you mean "unless the lossy algorithm has a perverse encoding." But your argument proves too much. It's true that no lossless algorithm can beat a lossy algorithm if averaged across all possible images, for precisely the r…

> I think you mean "unless the lossy algorithm has a perverse encoding."

That's right.

> It's true that no lossless algorithm can beat a lossy algorithm if averaged across all possible images

I concede the point. I thought that this argument applied to the average of any input set, not just the set of all possible images, but then I realized that it's actually pretty easy to come up with counterexamples e.g. N input images, which can be losslessly compressed to log2(N) bits, which will easily outperform jpg for small N. That's not a very realistic situation, but it does torpedo my "proof".

So you were right, and I was wrong.

Re: FLIF – Free Lossless Image Format

#236
post #197
post #108

Earlier quoted context omitted.

Doesn't matter. Whatever you do to compress losslessly you can always do better if you're allowed to discard information. And the structure is part of the reason. For lossless compression you have to keep all the noise, all the invisible details. With lossy compression you're allowed to discard all that.

Yes, that's what I said.

Just for the record: https://news.ycombinator.com/item?id=22272837

Re: FLIF – Free Lossless Image Format

#237

Earlier quoted context omitted.

> It'd be lovely to have photos / screenshots / gifs all able to share a common format. Given the way GIF is used nowadays the only reason it exists is it let's you put a video on the most of the places where you are only allowed to put pictures. For some weird reason many of such websites still won't let you upload an MP4 file despite they auto-convert the gifs you upload to MP4/AVC. From the technical point of view…

Spinners are nothing but energy drain anyway. If there's no progress, spinner won't stop.

Objectively worse are infinite CSS-animations with opacity:0 set on them that Blink can't figure out are indeed invisible and don't need repainting at 60fps. Cue me noticing my CPU is at 100% and 69°C after about 2 minutes...

(ThinkPad T400s are really bad at thermal management.)

Re: FLIF – Free Lossless Image Format

#238
post #235
post #212

Earlier quoted context omitted.

> Therefore, on average, unless the lossless algorithm has a perverse encoding that uses more bits than necessary to encode the possible outputs, no lossless algorithm can beat it on average I think you mean "unless the lossy algorithm has a perverse encoding." But your argument proves too much. It's true that no lossless algorithm can beat a lossy algorithm if averaged across all possible images, for precisely the r…

> I think you mean "unless the lossy algorithm has a perverse encoding." That's right. > It's true that no lossless algorithm can beat a lossy algorithm if averaged across all possible images I concede the point. I thought that this argument applied to the average of any input set, not just the set of all possible images, but then I realized that it's actually pretty easy to come up with counterexamples e.g. N input…

It's probably still true that no lossless format could possibly beat lossy JPEG for typical photos.

If I understand your example correctly, it only has the lossless algorithm beating JPEG by cheating: the lossless algorithm contains a dictionary of the possible highly compressible images in it, so the algorithm plus the compressed images still weighs more than libjpeg plus the JPEGs. But there are other cases where the lossless algorithm doesn't have to cheat in this way; for example, if you have a bunch of images generated from 5×5-pixel blocks of solid colors whose colors are generated by, say, a known 68-bit LFSR, you can code one of those images losslessly in about 69 bits, but JPEG as typically used will probably not compress them by an atypical amount. Similarly for images generated from the history of an arbitrary 1-D CA, or—to use a somewhat more realistic example—bilevel images of pixel-aligned monospaced text in a largish font neither of whose dimensions is a multiple of 8, say 11×17. All of these represent images with structure that can be straightforwardly extracted to find a lossless representation that is more than an order of magnitude smaller than the uncompressed representation, but where JPEG is not good at exploiting that structure.

Re: FLIF – Free Lossless Image Format

#239
post #135
post #47

Always cool to see new visual compression libraries hit the scene. That said I think the hardest part isn't the math of it, but the adoption of it. Likely the format with the best chance of overthrowing the jpg/gif/png incumbents is AVIF. Since it's based on AV1, you'd get hardware acceleration for decoding/encoding once it starts becoming a standard, and browser support will be trivial to add once AV1 has wide suppo…

Would this really be lovely? Isn't there some value in having 3 distinct formats (still picture, moving picture, moving picture with audio)? Each one is a subset of the next, but they are 3 different things that can easily be identified by what they (only potentially, but probably) are.

It's a win from the implementation side because you can support all three use cases with one format, reducing code duplication and at least hypothetically leveraging the same improvements across the three use cases with no additional effort.

The UX concern you're describing doesn't necessarily have to have anything to do with the implementation details themselves, as demonstrated by sites like imgur rebranding silent mp4/webms as "gifv". As long as the new format makes it reasonably easy to access data about its content (e.g., header field indicating animation/movement), there shouldn't be any issue with collapsing the use cases into a single implementation and simultaneously addressing the UX concern you mention.

Re: FLIF – Free Lossless Image Format

#240

Earlier quoted context omitted.

>Likely the format with the best chance of overthrowing the jpg/gif/png incumbents is AVIF I used to think the same as well, however I now think Jpeg XL is poised to be the 'winner' among next gen image codecs. It's royalty free, great lossy and lossless compression which is said to beat the competition, as well as providing a perfect upgrade path for existing jpeg's as it can losslessly recompress them into the jpeg…

JPEG XL is a terrible name for something that claims to produce extra small results.

PIK project is also a terrible name for people who understand Danish.
Post reply on HN