CyberKnowledge Technology Blog

Everything tech – reviews, tips, software, news

All tech all the time

Welcome to CyberKnowledge technology blog.

Compress Your PNG Files Up To 50%; No Quality Loss

Posted by Alex Bailey On December - 1 - 2006

PNG CompressionIf you’re a webmaster, then page load times should be of the most importance. Images can cause high load times if not handled properly. I’ve been using the PNG file format for some time now. It compresses great, and the image quality doesn’t suffer. Recently I stumbled upon an application to compress images even further. With a little work, I added a right click option for PNG files so I can compress them with a click of a button. The hack does require a registry edit, so if you’re weary then don’t proceed. To start download the executable file from here. Move it into a permanent directory such as C:\Windows

First go to Start > Run, and type ‘regedit’
Go to HKEY_Classes_Root, and find png > shell

Right click on that and create a new key called ‘Crush’. In crush make a key called command. In command edit the default value of the string to say

C:\Users\Rub3X\Desktop\pngcrush-1.5.10-win32.exe -e _new.png “%1″

You’ll need to use your path to the executable file obviously. I eventually stuck mine in the System32 folder.

If you want to use different options you can always run the file in command prompt, and it outputs them all. Using this program results in a smaller PNG image, without any quality loss at all. I’ll convert all the images on this blog using it, and definitely use it in the future.

This does work on Vista and XP for sure, but is untested on any other version of Windows. Sometimes the image does not compress, and I’m not sure why. Perhaps it’s because it can’t be compressed any further. It’s nothing you did wrong, rather than the application’s fault.

If done successfully, you’ll get at least a 50% better PNG file. This is assuming the original file was at least 300 Kbs. For smaller files you can expect a 20-30% improvement. This will definitely save your users a lot of load time, and you a lot of bandwidth.


See also...

Leave a Reply