http://tinypng.org/ is a great service, they optimized my png images by ~67%. How does their service work? How can they minimize size and quality of pictures still remains the same?
PNG uses DEFLATE, a non-patented lossless data compression algorithm involving a combination of LZ77 and Huffman coding. Permissively-licensed DEFLATE implementations, such as zlib, are widely available.
Unlike JPEG files that get terrible picture artifacts with heavy compression, PNG's use lossless compression, meaning compression doesn't impact image quality. There's initial compression done in the export stage, but you can use further methods to reduce the PNG file size more.
The biggest advantage of PNG over JPEG is that the compression is lossless, meaning there is no loss in quality each time it is opened and saved again. PNG also handles detailed, high-contrast images well.
PNG compression is almost identical to ZIPping files. You can compress them more or less but you get the exact file back when it decompresses -- that's what makes it lossless.
The answer's right on that web page:
When you upload a PNG (Portable Network Graphics) file, similar colours in your image are combined. This technique is called “quantisation”. Because the number of colours is reduced, 24-bit PNG files can be converted to much smaller 8-bit indexed colour images. All unnecessary metadata is stripped too. The result: tiny 8-bit PNG files with 100% support for transparency. Have your cake and eat it too!
It turns 24-bit RGB files into palettized 8-bit ones. You lose some color depth, but for small images it's often imperceptible.
You can do the same thing manually on the command line with this awesome tool: http://pngquant.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With