Saturday, 12 May 2012
Compress PNG Files without losing quality.
Getting the size of images down to decrease site load time is a big problem for webmasters like me,that too without losing quality.so one day i came across a tool which is light weight and whittles down the quality of the image by converting the png-24 image to png-8 without causing pixelating or loss of transparency to the photo.
The name of the Tool is pngquant.
pngquant is a command-line utility for converting 24/32-bit PNG images to paletted (8-bit) PNGs. The conversion reduces file sizes significantly (often as much as 70%) and preserves full alpha transparency. Generated images are compatible with all modern web browsers, and have better fallback in IE6 than 24-bit PNGs.
- High-quality palette generation using modernized Median Cut algorithm.
- Unique dithering algorithm that adds less noise to images than the standard Floyd-Steinberg.
- Easy to integrate with shell scripts, GUIs and server-side software.
- Fast mode for processing large numbers of images.
- This is done by using command line zlib library,but you needn’t worry because for you the task is only drag and drop and rest it does itself.
The example of this work is the images used in this post and our logo,they had other wise been heavy weight png,but now they stand at a small size ,and they don’t cause your site to load slowly,which is the problem with most of the sites these days.
So here is how to use it,just pick up you photo(png),and drop it on the command line shortcut,you may use any of the shortcut from the three but i would suggest to use all three of them to get the lowest size possible of the photos.