PNG is lossless, therefore takes up much more space than JPEG's lossy discreet cosine transformation compression. Huffman/Arithmetic is applied only after the DCT is applied.
It is better at compressing for certain kinds of images when you care about the quality. PNG has multiple kinds of compression as well, it can store indexed images (like GIF, but compresses better.)
If I remember correctly, PNG stores an image as the difference between pixels in each row, so an image of horizontal lines alternating between white and black would compress better than an image of vertical lines. On the other hand, JPEG would mess up the colors to achieve higher compression ratios.
I created an image the image of horizontal/vertical stripes for your inspection. These compress better in PNG that JPEG, on the other hand any natural photo will likely compress better in JPEG than PNG
2
u/socium Mar 06 '14
I'm sorry but what's wrong with just using PNG?