Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I see what you mean, but you are losing source information no matter what you start with.


Consider an extremely simple codec that uses only (lossless) run-length encoding [1]. You have an image of a blue sky with a few white clouds. One of the rows might have pixels Blue-Blue-Blue-Blue-White-White. This would be encoded as 4Blue-2White. The amount of information is the same, but you've removed redundancy (this is more or less how fax machines work).

A lossy codec would take advantage of limits in human perception and encode LightBlue-MediumBlue-DarkBlue as 2LightBlue-DarkBlue. On a large enough image, you wouldn't notice the difference.

[1] https://en.wikipedia.org/wiki/Run-length_encoding




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: