
I pngcrushed this image.
As we all know, png images are the best thing that’s ever happened. Unfortunately, lots of image editors wantonly save gama and other chunks in them without asking. This can cause pngs to be rendered a different color than elements in the web page they were supposed to match. So I fixed XP to have an option in the context menu for .png files to run them through pngcrush. It’s nothing fancy, but it’s improved my workflow. And this is how I did it!
First, you’ll want to go get pngcrush. If you manage to navigate you way through sourceforge’s download region, you’ll wind up with a win32 executable and some other unimportant junk. You should put that executable somewhere safe – Mine is called C:\pngcrush\pngcrush.exe.
Next, create a couple of files:
C:\pngcrush\pngcrush.bat:
copy %1 %1.bak
C:\pngcrush\pngcrush.exe -rem gAMA -rem cHRM -rem iCCP -rem sRGB -brute -l 9 %1 %TMP%\pngcrush-tmp.png
copy %TMP%\pngcrush-tmp.png %1
del %TMP%\pngcrush-tmp.png
pngcrush.reg:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\pngfile\shell\Pngcrush]
@="&Pngcrush"
[HKEY_CLASSES_ROOT\pngfile\shell\Pngcrush\command]
@="\"C:\\pngcrush\\pngcrush.bat\" \"%1\""
Obviously you’ll have to adjust the paths if you’re a sissy and don’t save everything in a directory off C:\ the way I do. And if you don’t like my pngcrush options, you don’t know what you’re doing. Anyway, run that .reg file. If successful, you should now have a “Pngcrush” option when you right-click on .png files!
