Demonstro

This and that worthy the effort

Crushing disobedient png's

, , , ,

Having followed the excellent recipe at Frisk Design I've made many a puny png nice and crunchy. But the method works on folders only, and that is not always desirable. If you're working against a folder already containing optimized files, it makes no sense to try and crush them again. Not to mention all the time this takes. Well, it usually takes a couple of seconds, but it feels totally unnecessary. And it is.

Since Windows 7, throwing shell commands into your registry has changed a bit. For file types, you now have to hunt down HKEY_CLASSES_ROOT\SystemFileAssociations\.ext. (AFAIK, this used to be directly at HKEY_CLASSES_ROOT\.ext.)

Registry keys added

Anyhow. To make your single png crumble beneath your cursor, add a key to the .png/shell key and name it "crush". Selecting this new key, double click its default value and name it something like "Crush this PNG". Then add a new key and name it "command". Give this key's default value this baby: (On one line.)

cmd.exe /k "pngcrush.exe -fix -rem allb -rem gAMA -e .new "%0" && del "%0" && ren *.new *.png && exit"

That should be it. Crush away!

PS: What you do to your registry is totally your responsibility!

Flaming Grizzly SkullMore wallpapers

Write a comment

New comments have been disabled for this post.