Hacker News new | ask | show | jobs
by agentgt 3298 days ago
It looks like FLIF doesn't really support lossy well (its sort of fake lossy).

"FLIF does not have a lossy mode, but interlaced files can be decoded progressively so we can simply use something like dd if=lossless.flif of=lossy.flif bs=1024 count=5"

You can see this in the examples where BPG does well in stream loading: https://nokiatech.github.io/heif/technical.html

HEIF would probably be similar to BPG in performance.

Still FLIF looks pretty darn interesting.

2 comments

> It looks like FLIF doesn't really support lossy well

I don't know what you mean by well. As far as I'm concerned lossy FLIF beats JPEG easily. Here is a comparision:

http://flif.info/lossy-artifacts.html

Whoops looks like I pasted the wrong link.

Here is the correct link: http://flif.info/example.html

And yes "well" is relative and what I meant by that is that its not readily easy for a normal user to do it.

BTW I think Flif is damn good particularly progressive decoding. Its unclear how good HEIF progressive decoding is.

Yeah, even on that fair; jpg-unfriendly example jpeg still clearly beats flif above 22kb. And below 22kb - sure, FLIF is less bad, but it's still unusable. Also, the examples below 22kb are a little unfair to most codecs in practice, since you'd get far better results by downscaling first.
Lossless compression can be made lossy by slightly modifying every pixel in ways that make them compress better. E.g. if there is a random black pixel in the middle of a white field, just make it white and you save 3 bytes. That's how lossy PNG works. IMO that's a more elegant way of doing lossy compression.