<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><title type="text">WeirdLooking.com: Michael Barton's Blog</title><rights>Copyright 2006</rights><author><name>Michael Barton</name><email>palrich@gmail.com</email></author><updated>2010-07-30T03:18:34Z</updated><generator>WeirdLooking.com</generator><logo>http://www.weirdlooking.com/images/feed.png</logo><link rel="alternate" type="text/html" href="http://www.weirdlooking.com/" /><link rel="self" type="application/xml+atom" href="http://www.weirdlooking.com/atom/tag/png" /><id>http://www.weirdlooking.com/</id><entry><title type="text">using pngcrush in windows</title><author><name>Michael Barton</name></author><link rel="alternate" type="text/html" href="http://www.weirdlooking.com/blog/using-pngcrush-in-windows" /><id>http://www.weirdlooking.com/blog/using-pngcrush-in-windows</id><published>2006-08-31T10:00:05Z</published><updated>2006-08-31T10:00:05Z</updated><content type="html">&lt;div style=&quot;float: right; margin: 2px; padding: 2px; border: solid 1px #555555;&quot;&gt;&lt;img src=&quot;http://www.weirdlooking.com/blog/64/pngcrush.png&quot; alt=&quot;pngcrushery&quot; /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;I pngcrushed this image.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt; &lt;span style=&quot;color: #880000&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Disclaimer: I don&amp;rsquo;t know what I&amp;rsquo;m doing.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As we all know, png images are the best thing that&amp;rsquo;s ever happened.&amp;nbsp; Unfortunately, lots of image editors wantonly save gama and other chunks in them without asking.&amp;nbsp; This can cause pngs to be rendered a different color than elements in the web page they were supposed to match.&amp;nbsp; So I fixed XP to have an option in the context menu for .png files to run them through pngcrush.&amp;nbsp; It&amp;rsquo;s nothing fancy, but it&amp;rsquo;s improved my workflow.&amp;nbsp; And this is how I did it!&lt;br /&gt;&lt;br /&gt;First, you&amp;rsquo;ll want to go get &lt;a href=&quot;http://sourceforge.net/project/showfiles.php?group_id=1689&quot; style=&quot;position: relative; padding-left: 8px; zoom: 1;&quot;&gt;&lt;span style=&quot;position: absolute; top: -5px; left: 0px; width: 16px; height: 16px; background: URL(http://www.weirdlooking.com/exticon?http%3A%2F%2Fsourceforge.net%2Fproject%2Fshowfiles.php%3Fgroup_id%3D1689) no-repeat center center; -moz-opacity: 0.3; opacity: 0.3; filter:alpha(opacity=30);&quot;&gt;&lt;/span&gt;pngcrush&lt;/a&gt;.&amp;nbsp; If you manage to navigate you way through sourceforge&amp;rsquo;s download region, you&amp;rsquo;ll wind up with a win32 executable and some other unimportant junk.&amp;nbsp; You should put that executable somewhere safe &amp;#8211; Mine is called C:\pngcrush\pngcrush.exe.&lt;br /&gt;&lt;br /&gt;Next, create a couple of files:&lt;br /&gt;&lt;br /&gt;&lt;cite&gt;C:\pngcrush\pngcrush.bat&lt;/cite&gt;:&lt;blockquote class=&quot;quotation&quot;&gt;&lt;p&gt;&lt;code style=&quot;display: block;&quot; class=&quot;blockocode&quot;&gt;copy %1 %1.bak&lt;br/&gt;C:\pngcrush\pngcrush.exe -rem gAMA -rem cHRM -rem iCCP -rem sRGB -brute -l 9 %1 %TMP%\pngcrush-tmp.png&lt;br/&gt;copy %TMP%\pngcrush-tmp.png %1&lt;br/&gt;del %TMP%\pngcrush-tmp.png&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;cite&gt;pngcrush.reg&lt;/cite&gt;:&lt;blockquote class=&quot;quotation&quot;&gt;&lt;p&gt;&lt;code style=&quot;display: block;&quot; class=&quot;blockocode&quot;&gt;Windows Registry Editor Version 5.00&lt;br/&gt;&lt;br/&gt;[HKEY_CLASSES_ROOT\pngfile\shell\Pngcrush]&lt;br/&gt;@=&quot;&amp;Pngcrush&quot;&lt;br/&gt;&lt;br/&gt;[HKEY_CLASSES_ROOT\pngfile\shell\Pngcrush\command]&lt;br/&gt;@=&quot;\&quot;C:\\pngcrush\\pngcrush.bat\&quot; \&quot;%1\&quot;&quot;&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Obviously you&amp;rsquo;ll have to adjust the paths if you&amp;rsquo;re a sissy and don&amp;rsquo;t save everything in a directory off C:\ the way I do.&amp;nbsp; And if you don&amp;rsquo;t like my pngcrush options, you don&amp;rsquo;t know what you&amp;rsquo;re doing.&amp;nbsp; Anyway, run that .reg file.&amp;nbsp; If successful, you should now have a &amp;ldquo;Pngcrush&amp;rdquo; option when you right-click on .png files!</content><category term="website" /><category term="png" /><link rel="comments" type="application/atom+xml" href="http://www.weirdlooking.com/atom/comments/64" /><wfw:commentRss>http://www.weirdlooking.com/atom/comments/64</wfw:commentRss><slash:comments>6</slash:comments></entry></feed>