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

This is a lossy encoder, which means that the image that comes out the other end doesn't contain exactly the same information as the image that goes in.

You can use all kinds of cleverness that is mostly unrelated to the actual image format itself to shrink the size of an image.

Here's one example: if an image uses millions of colours, you could drop it down to just using a few hundred colours (picking the nearest colour from your pallette to each of the pixels) and hence shrink the filesize a whole bunch. There are lots of different approaches to picking that initial pallette though - you might do it based on averaging out the pixel colours, or maybe you know something about human visual colour perception and can hence behave differently for colours that you don't think people will notice as easily.



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

Search: