Adding PNGOUT to the Explorer Right Click Context Menu
I've been creating more PNGs lately on the blog. However, the default PNGs created by most tools are fat fat fat. PNGOUT to the rescue.
So, now I use PNGOUT to compress all PNGs before they are uploaded to the blog now. It's wonderful. It looks like Rick "Paint.NET Guy" Brewster is also enamored with PNGOUT and is considering integrating support directly into PAINT.NET although there might be legal issues. I'd be happy with a simple "call PNGOUT when you're done" option. Poof, we've avoided any legal trouble.
I know there's lots of Windows Apps that front PNGOUT and other PNG apps, but I like my things integrated and automatic.
Thoughts:
- I wonder if someone could write a Windows Live Writer Plugin to run PNG out on files created by WLW before they are posted?
- Since I'm using Kenny Kerr's Window Clippings to create the PNGs, it'd be more expedient to ask him to add the "Call PNGOUT when you're done"-feature to his tool.
- I think I'll just integrate PNGOUT with the shell, it'll be faster...
Create PNGOUT.reg file that looks like this:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\pngfile\shell\PNGOUT]
[HKEY_CLASSES_ROOT\pngfile\shell\PNGOUT\command]
@="\"C:\\Utils\\pngout.exe\" \"%1\""
Make sure you change your path to PNGOUT to match reality. Now you have this available in Explorer:
Optimizing all existing PNGs on my blog
Ah, but I also need to tidy up the EXISTING PNGs from my site. First I'll download all the PNGs to my local drive, then fire up PowerShell and run this command that will recurse everywhere in the current directory and below and run PNGOUT on all the PNGs, replacing them in place:
get-childitem . -include *.png -recurse | foreach ($_) { pngout "$_"}
Uploaded, and now I've taken my total PNG size (of all PNGs in all posts on the blog) from 40,004,166 bytes to 23,004,247 bytes a savings of about 42%. That'll add up in bandwidth costs.
You can also optimize the autogenerated PNG files within Windows Live Writer by running that same PowerShell command on the files in
%APPDATA%\Windows Live Writer\PostSupportingFilesWriter\PostSupportingFiles
It's a shame that most default libraries for PNG make such large PNGs, considering that this is the "picture format design for the web." Thanks PNGOUT!
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
http://www.yafla.com/papers/purejpeg/filter_unnecessary_jpeg_info_such_as_exif.htm
http://weblogs.asp.net/kennykerr/archive/2007/04/12/looking-forward-to-window-clippings-2-0-storage.aspx
It's probably because most apps output PNGs with interlacing, which is a giant waste of time. Interlacing *alone* increases PNG file size substantially-- interlaced PNGs are 25-40% larger than non-interlaced PNGs.
Comments are closed.