Hacker News new | ask | show | jobs
by tlarkworthy 3682 days ago
No. PNG is lossless, it will do a really bad job at compression. Even those uniform colors won't actually be uniform because they are from image sensors.

JPEG is the appropriate comparison, as the authors are solving the same problem as JPEG tries to solve (i.e. a good enough lossy compression for natural images).

2 comments

PNG doesn't need to be lossless. You can identify the pixels that are requiring more bits to compress, and change their values to make them easier. It's not as good as JPEG, but I suspect it'd be comparable to this for the same level of quality.
PNG will always do a bad at compression. PNG is deflate encoded, but without the ability to rearrange pixel data to work with deflate's strengths. It will pick RGBA, which mixes the "entropy" data for each color channel together. PNG was born out of the necessity to replace the (at the time) patent encumbered GIF. PNG has a different purpose, and was designed to get something working fast.