<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chris JeanChris Jean &#187; favicon</title>
	<atom:link href="http://chrisjean.com/tag/favicon/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisjean.com</link>
	<description>Linux, WordPress, programming, anime, and other stuff</description>
	<lastBuildDate>Tue, 08 May 2012 20:36:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Creating a PHP ICO Creator for Favicons</title>
		<link>http://chrisjean.com/2011/07/21/creating-a-php-ico-creator-for-favicons/</link>
		<comments>http://chrisjean.com/2011/07/21/creating-a-php-ico-creator-for-favicons/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 15:15:58 +0000</pubDate>
		<dc:creator>Chris Jean</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[favicon]]></category>
		<category><![CDATA[ICO]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://chrisjean.com/?p=1965</guid>
		<description><![CDATA[For the past couple of weeks, I have worked on creating a PHP library to create ICO files. This has been difficult as all the documentation for the ICO format is either sparse or not completely documented. I&#8217;m doing this since I have yet to find a way of creating a valid favicon file using [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>For the past couple of weeks, I have worked on creating a PHP library to create ICO files. This has been difficult as all the documentation for the ICO format is either sparse or not completely documented.</p>
<p>I&#8217;m doing this since I have yet to find a way of creating a valid favicon file using just PHP and PHP&#8217;s GD library. Sure, I can create a PNG file and change the extension to &#8220;.ico&#8221;, but that doesn&#8217;t work in all browsers, on all operating systems (such as Windows XP), and is more of a hack than a valid method for creating favicon files.</p>
<p>So, it is time to make one. I have a placeholder github repository named <a title="GitHub Repository - PHP ICO" href="https://github.com/chrisbliss18/php-ico">php-ico</a>.</p>
<p>The primary goal is to make a robust, reliable library that creates valid ICO files that can be properly rendered on Windows XP+ and all the major browsers. Thus, my initial goal is not to support every format that exists nor is it to support parsing the ICO files. If the project gets enough attention, I&#8217;ll look at expanding the scope.</p>
<p>Here are the resources that I&#8217;ve found helpful as I&#8217;ve worked on this project:</p>
<ul>
<li><a title="Wikipedia - ICO (File Format)" href="http://en.wikipedia.org/wiki/ICO_%28file_format%29">ICO (file format)</a> &#8211; Wikipedia article about the ICO file format. This has a very comprehensive description of the ICO header. It is sparse on details about the format of the image data.</li>
<li><a title="Wikipedia - BMP file format" href="http://en.wikipedia.org/wiki/BMP_file_format">BMP file format</a> &#8211; Wikipedia article about the BMP file format. This helped me understand the headers and pixel data format for the BMP image data.</li>
<li><a title="Wikipedia - Portable Network Graphics" href="http://en.wikipedia.org/wiki/Portable_Network_Graphics">Portable Network Graphics</a> &#8211; Wikipedia article about the PNG file format. This gave me what I needed to know to identify PNG image data.</li>
<li><a title="Article - Windows Bitmap File Format" href="http://www.mediatel.lu/workshop/graphic/2D_fileformat/h_bmp.html">Windows Bitmap File Format</a> &#8211; Very good article that delves into more details about the BMP file format. The extra details about the different types of headers, compression methods, compression encoding, and examples were very helpful.</li>
<li><a title="Microsoft Developer Network Article - Icons" href="http://msdn.microsoft.com/en-us/library/ms997538.aspx">Icons</a> &#8211; A Microsoft Developer Network article from 1995 that provides the original ICO file format spec. While this is the most authoritative, I really didn&#8217;t find this to be as much help as other sources.</li>
<li><a title="The Code Project Article - Replacing ICON resources in EXE and DLL files" href="http://www.codeproject.com/KB/DLL/ICON_Resources.aspx?display=Mobile">Replacing ICON resources in EXE and DLL files</a> &#8211; Article from The Code Project that has a breakdown of the format similar to what is found in the MSDN article. Example C code is provided.</li>
<li><a title="Bugzilla@Mozilla - Bug 600556 - Support Vista-style ICO files" href="https://bugzilla.mozilla.org/show_bug.cgi?id=600556">Support Vista-style ICO files</a> &#8211; Mozilla Bugzilla filed bug. The discussion has some great information about methods used to reliably parse varying ICO formats and structures. It also has some good test ICO files to try.</li>
<li><a title="Chironex Software Post - Convert HBITMAP to .ICO file" href="http://chironexsoftware.com/blog/?p=13">Convert HBITMAP to .ICO file</a> &#8211; This Chironex Software blog post provided the last piece I needed: how to structure the opacity mask data. Where he found this information (since I didn&#8217;t find it in any of the above articles) I haven&#8217;t a clue.</li>
</ul>
<p>If this post gets some traction and interest, I&#8217;ll consider putting together a post detailing all the different pieces I&#8217;ve found here. I&#8217;m not a spec writer, but I&#8217;d try my best. Let me know if you&#8217;d like to have me work on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2011/07/21/creating-a-php-ico-creator-for-favicons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change Google favicon Back</title>
		<link>http://chrisjean.com/2009/01/23/change-google-favicon-back/</link>
		<comments>http://chrisjean.com/2009/01/23/change-google-favicon-back/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 06:00:48 +0000</pubDate>
		<dc:creator>Chris Jean</dc:creator>
				<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[favicon]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Greasemonkey]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=701</guid>
		<description><![CDATA[Google&#8217;s original capital G favicon was around for, I don&#8217;t know, forever. Around June, they changed it to a lowercase g. I know that many people threw up their hands in disgust, but I actually liked it. It looked very clean and neat. However, they recently changed the favicon yet again. Now Google&#8217;s favicon is [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>Google&#8217;s original capital G favicon was around for, I don&#8217;t know, forever. Around June, they changed it to a lowercase g. I know that many people threw up their hands in disgust, but I actually liked it. It looked very clean and neat. However, they recently changed the favicon yet again.</p>
<p>Now Google&#8217;s favicon is this very colorful icon with green, blue, yellow, and red colors from their logo. I don&#8217;t necessarily dislike this new favicon, but I simply don&#8217;t and can&#8217;t associate it with Google. Google has always been represented by clean simplicity. They don&#8217;t need wizbang fancy images because they are simply good and don&#8217;t need to be fancy to attract people.</p>
<p>I think that&#8217;s why I liked the simple blue and white icon, even when they changed it. It was simple, to the point, laconic even; It was, in a word: Google.</p>
<p>Now when I have numerous Google tabs open, I look up at my tabs and just can&#8217;t help but think, &#8220;what is that site and why do I so many tabs of it?&#8221; I tried getting used to it, but I simply cannot. So, I decided that I would find a way to do something about it.</p>
<p><span id="more-701"></span></p>
<p>Enter <a href="https://addons.mozilla.org/en-US/firefox/addon/748" target="_blank">Greasemonkey</a> and a fantastic userscript simply called <a href="http://userscripts.org/scripts/show/27548" target="_blank">Google&#8217;s Old Favicon</a>. Now, I have to say, that the creator of this script, <a href="http://userscripts.org/users/54353" target="_blank">!user</a>, did a fantastic job not just with the script but with the name of the script as well. &#8220;Google&#8217;s Old Favicon&#8221;? Genius. The name itself is simple, to the point, and not looking to pretend to be more than pure, efficient utility.</p>
<p>Anyways&#8230; Enough gushing about names and ranting on. Back to the task at hand.</p>
<p>This script is written in Javascript, but it requires Greasemonkey. Let&#8217;s take care of that first.</p>
<h2>Installing Greasemonkey</h2>
<p>Greasemonkey is a Firefox add-on. As such, you need to install it in Firefox before it will work. Simply visit the <a href="https://addons.mozilla.org/en-US/firefox/addon/748" target="_blank">Greasemonkey add-on page</a>, click &#8220;Add to Firefox&#8221;, click the &#8220;Install Now&#8221; button, and click the &#8220;Restart&#8221; button when the install is complete. When Firefox restarts, you will have a nice new shiny plugin to play with.</p>
<p>Wasn&#8217;t that easy? You have to love the simplicity of Firefox add-ons.</p>
<p>Now it&#8217;s time for the userscript (this is what Greasemonkey scripts are called).</p>
<h2>Installing Google&#8217;s Old Favicon</h2>
<p>If you&#8217;re new to Greasemonkey, installing a userscript will seem a bit odd. There is a <a title="Installing Scripts to Greasemonkey" href="http://wiki.greasespot.net/Greasemonkey_Manual:Installing_Scripts" target="_blank">helpful document</a> on the <a href="http://wiki.greasespot.net/Main_Page" target="_blank">Greasespot wiki</a> that details how to use Greasemonkey in detail. I don&#8217;t intend to try to reproduce that; rather, I just intend to give you enough information to get Google&#8217;s Old Favicon going.</p>
<p>Once you have Greasemonkey loaded, you can simply click <a title="Install Google's Old Favicon userscript" href="http://userscripts.org/scripts/version/27548/57958.user.js">this link</a> to install the Google&#8217;s Old Favicon userscript. When you click the link, Greasemonkey will pop up a dialog. Click the &#8220;Install&#8221; button when it appears to install the userscript in Greasemonkey. You&#8217;re done, now the userscript is ready to go.</p>
<p>Now it&#8217;s time to load up a new tab and look at the results.</p>
<p>By default, the original capital G favicon is used. If you&#8217;re like me and wish to use the old lowercase g favicon, you can do that by modifying the userscript.</p>
<ol>
<li>Go to Tools &gt; Greasemonkey &gt; Manage User Scripts</li>
<li>Highlight &#8220;Google&#8217;s Old Favicon&#8221;</li>
<li>Click &#8220;Edit&#8221;</li>
<li>If you haven&#8217;t modified a Greasemonkey userscript before, a file dialog will appear in order for you to pick your preferred editor.
<ul>
<li>If you&#8217;re running Linux and are running GNOME (which is what Ubuntu runs by default), you can type in &#8220;/usr/bin/gedit&#8221; to use Gedit, the default text editor in GNOME.</li>
<li>If you&#8217;re running Windows, you can use &#8220;C:\Windows\notepad.exe&#8221; to use Notepad, the deafult text editor in Windows.</li>
</ul>
</li>
<li>Once the userscript is loaded in the editor of your choice, simply change this line:<br />
<code style="padding-left:20px;">const EDITION = 0;</code><br />
To:<br />
<code style="padding-left:20px;">const EDITION = 1;</code></li>
<li><span class="sh_number">Then you just need to save the file and close the editor</span></li>
</ol>
<p>The change takes effect immediately.</p>
<p>Enjoy your new, make that old, Google favicon.</p>
<h2>Closing Thoughts</h2>
<p>By duplicating this script and customizing it, you can use it to apply custom favicons to any of your sites.</p>
<p>Greasemonkey can offer an amazing array of options that allow you to not only modify the way your browser behaves but to modify the pages that are loaded as well. I highly recommend that you look around <a href="http://userscripts.org/" target="_blank">Userscripts.org</a> and see what different kind of scripts are available.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/01/23/change-google-favicon-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

