<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Andy Li's Blog</title>
	
	<link>http://blog.onthewings.net</link>
	<description>Blog on Flash/Flex, web development, design, media art, and my personal life.</description>
	<lastBuildDate>Sat, 06 Mar 2010 21:55:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AndyLi" /><feedburner:info uri="andyli" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Colorblink – An AIR app that simulates how color blind people see Flash and images</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/BeCuf42qzDM/</link>
		<comments>http://blog.onthewings.net/2010/02/19/colorblink-an-air-app-that-simulates-how-color-blind-people-see-flash-and-images/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 12:55:31 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Pixel Bender]]></category>
		<category><![CDATA[web usability design and engineering]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=717</guid>
		<description><![CDATA[
			
				
			
		Accessibility is a an important part of both web and game design. And for web and game design, one of the popular tool is Flash. That means very often you need to ensure accessibility in Flash. However there are still not many tools available even for simple things like color blind simulation&#8230; so I write my own:)
&#62;&#62; download [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.onthewings.net%2F2010%2F02%2F19%2Fcolorblink-an-air-app-that-simulates-how-color-blind-people-see-flash-and-images%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.onthewings.net%2F2010%2F02%2F19%2Fcolorblink-an-air-app-that-simulates-how-color-blind-people-see-flash-and-images%2F&amp;source=andy_li&amp;style=compact" height="61" width="50" />
			</a>
		</div><div id="attachment_718" class="wp-caption alignleft" style="width: 460px"><a href="http://blog.onthewings.net/wp-content/uploads/2010/02/colorblink-demo.png"><img class="size-medium wp-image-718" title="Colorblink demo" src="http://blog.onthewings.net/wp-content/uploads/2010/02/colorblink-demo-450x364.png" alt="" width="450" height="364" /></a><p class="wp-caption-text">Select color blind type from the menu.</p></div>
<p>Accessibility is a an important part of both web and game design. And for web and game design, one of the popular tool is Flash. That means very often you need to ensure accessibility in Flash. However there are still not many tools available even for simple things like color blind simulation&#8230; so I write my own:)</p>
<p><a href="http://github.com/andyli/Colorblink/raw/master/Colorblink.air">&gt;&gt; download installer (.air)</a></p>
<p>It&#8217;s a very simple AIR app. You open it, drop a swf file on its window, select the color blind type and that&#8217;s it.</p>
<p>The inner of Colorblink is using a Pixel Bender filter, applying to the whole application. The algorithm is just a color transform matrix, found in <a href="http://homepage.mac.com/lpetrich/ColorBlindnessSim/ColorBlindnessSim.html">a Java Color-Blindness Simulators</a>. That simulator have more simulation config, which I used only the simplest one.</p>
<p>This is also my first time using a git repo. So <a href="http://github.com/andyli/Colorblink">go to have a look</a>, see if you can fork it for more features.</p>
<p><span style="text-decoration:line-through">One thing is, there is problem loading Flex applications into Colorblink&#8230; I don&#8217;t know how to read the loaded app&#8217;s default width and height and then resize it&#8230; So, if you want to test your Flex app, <a href="http://github.com/andyli/Colorblink/tree/master/src/net/onthewings/filters/">get the filter</a> and apply it to your app manually (can&#8217;t be easier).</span><br />
Now you can load Flex swf or even html file! But the app wouldn&#8217;t resize automatically since the size cannot be determined. If Colorblink does not work for you, you can still always <a href="http://github.com/andyli/Colorblink/tree/master/src/net/onthewings/filters/">get the filter</a> and apply it to your app manually (can&#8217;t be easier).</p>
<p>Oh, yes, there is a simulation of what a dog sees&#8230; So, design some game for your dogs in your free time&#8230;</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=BeCuf42qzDM:rQxwC2CdO2U:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=BeCuf42qzDM:rQxwC2CdO2U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=BeCuf42qzDM:rQxwC2CdO2U:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/BeCuf42qzDM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2010/02/19/colorblink-an-air-app-that-simulates-how-color-blind-people-see-flash-and-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.onthewings.net/2010/02/19/colorblink-an-air-app-that-simulates-how-color-blind-people-see-flash-and-images/</feedburner:origLink></item>
		<item>
		<title>A Greasemonkey script for you to try the “Amazing,Awesome,Great,Incredible…” iPad web experience</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/NLScEqyY6cA/</link>
		<comments>http://blog.onthewings.net/2010/02/02/a-greasemonkey-script-for-you-to-try-the-amazingawesomegreatincredible-ipad-web-experience/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 07:58:48 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=701</guid>
		<description><![CDATA[
			
				
			
		Steve Jobs says the iPad is &#8220;Amazing, Awesome, Beautiful, Great, Incredible, Really Nice and Unbelievable&#8221;. I&#8217;m sure you wanna try it. If you still haven&#8217;t get one to experience by yourself, here I made a little GreaseMonkey script for you to feel it first.
Once you installed the iPad experience script on FireFox (or any other [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.onthewings.net%2F2010%2F02%2F02%2Fa-greasemonkey-script-for-you-to-try-the-amazingawesomegreatincredible-ipad-web-experience%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.onthewings.net%2F2010%2F02%2F02%2Fa-greasemonkey-script-for-you-to-try-the-amazingawesomegreatincredible-ipad-web-experience%2F&amp;source=andy_li&amp;style=compact" height="61" width="50" />
			</a>
		</div><div id="attachment_702" class="wp-caption alignleft" style="width: 324px"><a href="http://blog.onthewings.net/wp-content/uploads/2010/02/Aviary-theflashblog-com-Picture-1.png"><img class="size-full wp-image-702  " title="ultimate browsing experience of iPad" src="http://blog.onthewings.net/wp-content/uploads/2010/02/Aviary-theflashblog-com-Picture-1.png" alt="" width="314" height="243" /></a><p class="wp-caption-text">Concept image from The Flash Blog demostrates iPad&#39;s ultimate browsing experience.</p></div>
<p>Steve Jobs says the iPad is <a href="http://gizmodo.com/5461445/the-apple-ipad-keynote-in-3-minutes-of-adjectives">&#8220;Amazing, Awesome, Beautiful, Great, Incredible, Really Nice and Unbelievable&#8221;</a>. I&#8217;m sure you wanna try it. If you still haven&#8217;t get one to experience by yourself, here I made a little GreaseMonkey script for you to feel it first.</p>
<p>Once you installed the <a href="http://userscripts.org/scripts/show/67828">iPad experience script</a> on FireFox (or any other browser that can use user script), you wouldn&#8217;t see any Flash elements again. No more Flash can hurt you or your children. Instead, all the swfs are replaced with a &#8220;Amazing, Awesome, Beautiful, Great, Incredible, Really Nice and Unbelievable&#8221; blue lego, reminding you the glory of Apple.</p>
<p>Update:<br />
You can use it in Chrome now (if you have extension enabled)!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=NLScEqyY6cA:L2vG3GuUeOY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=NLScEqyY6cA:L2vG3GuUeOY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=NLScEqyY6cA:L2vG3GuUeOY:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/NLScEqyY6cA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2010/02/02/a-greasemonkey-script-for-you-to-try-the-amazingawesomegreatincredible-ipad-web-experience/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.onthewings.net/2010/02/02/a-greasemonkey-script-for-you-to-try-the-amazingawesomegreatincredible-ipad-web-experience/</feedburner:origLink></item>
		<item>
		<title>Possibly the worst lift button arrangement I have ever met</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/_NobwEdksbg/</link>
		<comments>http://blog.onthewings.net/2010/01/23/possibly-the-worst-lift-button-arrangement-i-have-ever-met/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 07:54:33 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Art & Design]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=681</guid>
		<description><![CDATA[
			
				
			
		Here we have many lifts in Hong Kong since we have so many tall buildings. One of the lift I am using very often is the one inside Festival Walk(a shopping mall). Here are its buttons:
First of all, the mixed use of letters and numbers (also an icon) to name floor is confusing. I have [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.onthewings.net%2F2010%2F01%2F23%2Fpossibly-the-worst-lift-button-arrangement-i-have-ever-met%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.onthewings.net%2F2010%2F01%2F23%2Fpossibly-the-worst-lift-button-arrangement-i-have-ever-met%2F&amp;source=andy_li&amp;style=compact" height="61" width="50" />
			</a>
		</div><p>Here we have many lifts in Hong Kong since we have so many tall buildings. One of the lift I am using very often is the one inside Festival Walk(a shopping mall). Here are its buttons:</p>
						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4297220330"><img class="flickr medium" title="Buttons in the lift of Festival Walk" alt="Buttons in the lift of Festival Walk" src="http://farm3.static.flickr.com/2714/4297220330_e87d036e51.jpg" /></a></div>
					
<p>First of all, the mixed use of letters and numbers (also an icon) to name floor is confusing. I have seen many people had difficulty finding the right floor at first sight. If there were tens of floors which goes from lower-ground 5 to upper-ground 25, grouping the floors with something like &#8220;UG&#8221; and &#8220;LG&#8221; would be meaningful. But as you can see in the photo, there are only seven floors&#8230; So actually I cannot really tell it is some kind of grouping as the group has at most two members only&#8230; And for &#8220;UG&#8221;, I really don&#8217;t know why they&#8217;re not naming the &#8220;1&#8243; and &#8220;2&#8243; with &#8220;UG&#8221; as &#8220;UG1&#8243;,&#8221;UG2&#8243;,&#8221;UG3&#8243;. Or simply use &#8220;1&#8243;,&#8221;2&#8243;,&#8221;3&#8243;? You also need to think if &#8220;LG2&#8243; or &#8220;LG1&#8243; is upper floor.</p>
<p>Secondly, not all Hong Kong people know &#8220;LG&#8221; and &#8220;UG&#8221; stand for &#8220;lower-ground&#8221; and &#8220;upper-ground&#8221;. I have some friends misunderstood &#8220;UG&#8221; as underground&#8230; The users are mostly Hong Kong people which are not having English as native language. Anyway I don&#8217;t see a point why not use &#8220;-1&#8243;, &#8220;0&#8243;, &#8220;1&#8243;, &#8220;2&#8243;&#8230;</p>
<p>Lastly, the arrangement of the grid is confusing. The arrangement is different from written English(left to right, top to bottom) or traditional Chinese(top to bottom, right to left). See below:</p>
<p><a href="http://blog.onthewings.net/wp-content/uploads/2010/01/arrangments.png"><img class="alignnone size-full wp-image-684" title="arrangments" src="http://blog.onthewings.net/wp-content/uploads/2010/01/arrangments.png" alt="" width="720" height="192" /></a></p>
<p>Not only Festival Walk, but also City University of Hong Kong has this arrangment:</p>
						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4296473837"><img class="flickr medium" title="Buttons in the lift of City University of Hong Kong" alt="Buttons in the lift of City University of Hong Kong" src="http://farm3.static.flickr.com/2709/4296473837_c11e29626a.jpg" /></a></div>
					
<p>Is that only Hong Kong has these kind of lift? If so, maybe that&#8217;s because we Hong Kong people are proud to have both Western and Chinese culture which expressed in lift button arrangement?</p>
<p>Update:<br />
I finally have found another example of the arrangement, that is&#8230; Japanese comic?!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=_NobwEdksbg:2rUkO5-Unkg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=_NobwEdksbg:2rUkO5-Unkg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=_NobwEdksbg:2rUkO5-Unkg:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/_NobwEdksbg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2010/01/23/possibly-the-worst-lift-button-arrangement-i-have-ever-met/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.onthewings.net/2010/01/23/possibly-the-worst-lift-button-arrangement-i-have-ever-met/</feedburner:origLink></item>
		<item>
		<title>Chroma key and thresholding in Flash (Pixel Bender), revised</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/h-4qzL_k_kw/</link>
		<comments>http://blog.onthewings.net/2009/12/10/chroma-key-and-thresholding-in-flash-pixel-bender-revised/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 10:12:19 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[experiment]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Pixel Bender]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=635</guid>
		<description><![CDATA[
			
				
			
		
&#62;&#62;Demo&#60;&#60; (Click to toggle filter)
source (Flex project including pbk)
I have been very busy since the last few weeks&#8230; so the chroma key filter was put aside for a long time until today  
I have used conditional compile in the filter to avoid having if-else in the runtime, hopefully can increase performance&#8230; Anyone volunteer to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F12%2F10%2Fchroma-key-and-thresholding-in-flash-pixel-bender-revised%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F12%2F10%2Fchroma-key-and-thresholding-in-flash-pixel-bender-revised%2F&amp;source=andy_li&amp;style=compact" height="61" width="50" />
			</a>
		</div><p><img class="alignnone size-medium wp-image-642" title="yellowFiltered" src="http://blog.onthewings.net/wp-content/uploads/2009/12/yellowFiltered-450x337.png" alt="yellowFiltered" width="450" height="337" /></p>
<h3><a href="http://blog.onthewings.net/wp-content/uploads/2009/12/colorDifference.html">&gt;&gt;Demo&lt;&lt; <span style="font-size: smaller;">(Click to toggle filter)</span></a></h3>
<p><a href="http://blog.onthewings.net/wp-content/uploads/2009/12/colorDifference.zip">source (Flex project including pbk)</a></p>
<p>I have been very busy since the last few weeks&#8230; so the chroma key filter was put aside for a long time until today <img src='http://blog.onthewings.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I have used conditional compile in the filter to avoid having if-else in the runtime, hopefully can increase performance&#8230; Anyone volunteer to measure it and post the different?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=h-4qzL_k_kw:1yQ-U7nqMas:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=h-4qzL_k_kw:1yQ-U7nqMas:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=h-4qzL_k_kw:1yQ-U7nqMas:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/h-4qzL_k_kw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2009/12/10/chroma-key-and-thresholding-in-flash-pixel-bender-revised/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.onthewings.net/2009/12/10/chroma-key-and-thresholding-in-flash-pixel-bender-revised/</feedburner:origLink></item>
		<item>
		<title>CSS-only experiements</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/aH_i50xQoiY/</link>
		<comments>http://blog.onthewings.net/2009/11/24/css-only-experiements/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 08:35:52 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[experiment]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=612</guid>
		<description><![CDATA[
			
				
			
		In the last week I have tried to make some CSS-only experiments. Originally it&#8217;s just an idea to play some effects with CSS animation which now available in webkit. But at the end I am obsessed and making games with CSS&#8230; Yup, that&#8217;s embedding game logic in the place which designed to be presentation layer only&#8230;  
Video first, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F11%2F24%2Fcss-only-experiements%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F11%2F24%2Fcss-only-experiements%2F&amp;source=andy_li&amp;style=compact" height="61" width="50" />
			</a>
		</div><p>In the last week I have tried to make some CSS-only experiments. Originally it&#8217;s just an idea to play some effects with <a href="http://webkit.org/blog/138/css-animation/">CSS animation which now available in webkit</a>. But at the end I am obsessed and making games with CSS&#8230; Yup, that&#8217;s embedding game logic in the place which designed to be presentation layer only&#8230; <img src='http://blog.onthewings.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Video first, description follows:</p>
<p><a href="http://blog.onthewings.net/2009/11/24/css-only-experiements/"><em>Click here to view the embedded video.</em></a></p>
<h3>Mouse shadow</h3>
<table border="0">
<tbody>
<tr>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4129811385"><img class="flickr small" title="CSS experiment: Mouse shadow" alt="CSS experiment: Mouse shadow" src="http://farm3.static.flickr.com/2777/4129811385_f698cbc966_m.jpg" /></a></div>
					</td>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4130576658"><img class="flickr small" title="CSS experiment: Mouse shadow" alt="CSS experiment: Mouse shadow" src="http://farm3.static.flickr.com/2762/4130576658_4419cd860c_m.jpg" /></a></div>
					</td>
</tr>
</tbody>
</table>
<p><a href="http://blog.onthewings.net/wp-content/uploads/2009/11/css-experiment_mouse-shadow.php">Open experiment</a></p>
<p>It works on webkit browsers only (Chrome, Safari).</p>
<p>What I want to create is just some old-school shadow, fading etc. Turn out using a deeply-nested div for the effect is quite stylish. The divs are assigned to different classes based on their nested level to improve performance because <em>div &gt; div &gt;div &gt; &#8230; </em>is just too slow&#8230;</p>
<h3>Gear</h3>
<table border="0">
<tbody>
<tr>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4130576756"><img class="flickr small" title="CSS experiment: Gear" alt="CSS experiment: Gear" src="http://farm3.static.flickr.com/2513/4130576756_d12b7ee3e5_m.jpg" /></a></div>
					</td>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4129811585"><img class="flickr small" title="CSS experiment: Gear" alt="CSS experiment: Gear" src="http://farm3.static.flickr.com/2694/4129811585_a120478478_m.jpg" /></a></div>
					</td>
</tr>
<tr>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4130576954"><img class="flickr small" title="CSS experiment: Gear" alt="CSS experiment: Gear" src="http://farm3.static.flickr.com/2693/4130576954_19c1d75638_m.jpg" /></a></div>
					</td>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4130576994"><img class="flickr small" title="CSS experiment: Gear" alt="CSS experiment: Gear" src="http://farm3.static.flickr.com/2771/4130576994_dc6d7c029f_m.jpg" /></a></div>
					</td>
</tr>
</tbody>
</table>
<p><a href="http://blog.onthewings.net/wp-content/uploads/2009/11/css-experiment_gear.php">Open experiment</a></p>
<p>Again, works on webkit browsers only (Chrome, Safari).</p>
<p>I find the deeply-nested div has quite a potential to make some more things, so here is another product of it. Swapping the CSS transition with CSS transform achieved something very similar to <a href="http://en.wikipedia.org/wiki/Fractal">fractal</a>.</p>
<p>One little defect is I used percentage for the size of divs and the rounding number cause some gaps between divs&#8230; It is more noticeable when using resolution 3.</p>
<h3>Pixel art</h3>
<table border="0">
<tbody>
<tr>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4129811095"><img class="flickr small" title="CSS experiment: Pixel art" alt="CSS experiment: Pixel art" src="http://farm3.static.flickr.com/2732/4129811095_f867790c2c_m.jpg" /></a></div>
					</td>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4129811141"><img class="flickr small" title="CSS experiment: Pixel art" alt="CSS experiment: Pixel art" src="http://farm3.static.flickr.com/2501/4129811141_a80400e2fd_m.jpg" /></a></div>
					</td>
</tr>
</tbody>
</table>
<p><a href="http://blog.onthewings.net/wp-content/uploads/2009/11/css-experiment_pixel-art.php">Open experiment</a></p>
<p>This one works on all major browsers (IE 6/7/8, Firefox, Safari, Chrome) <img src='http://blog.onthewings.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This is a drawing board that you can click to draw pixel.</p>
<p>I remembered there are hackers tried to get users&#8217; browsing history by using color-change of visited link. It impressed me to store valued in the browsing history. Originally I used links with hash values (ie. <em>&lt;a href=&#8221;#123&#8243;&gt;&lt;/a&gt;</em>) and it works in all the browsers&#8230; except IE. IE will turn the color when you click on it but it does not store it in the history. So I switched to use <em>iframe</em>, that is setting the links to open in the iframe and serve a dummy webpage with random URL&#8230;</p>
<h3>Click Challege</h3>
<table border="0">
<tbody>
<tr>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4130576444"><img class="flickr small" title="CSS experiment: Click Challege" alt="CSS experiment: Click Challege" src="http://farm3.static.flickr.com/2505/4130576444_f87eb8b7e4_m.jpg" /></a></div>
					</td>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/andy-li/4130576522"><img class="flickr small" title="CSS experiment: Click Challege" alt="CSS experiment: Click Challege" src="http://farm3.static.flickr.com/2721/4130576522_c6ae207426_m.jpg" /></a></div>
					</td>
</tr>
</tbody>
</table>
<p><a href="http://blog.onthewings.net/wp-content/uploads/2009/11/css-experiment_click-challenge.php">Open experiment</a></p>
<p>This one is webkit browsers only (Chrome, Safari).</p>
<p>This is the latest experiment I made, which is really a playable game. <a href="http://webkit.org/blog/324/css-animation-2/">CSS keyframe animation</a> is used to simulate a timer. Lots of identical checkboxes to act as an area to let user clicks on. They are removed when clicked on it, using <em>:checked</em> in CSS. Finally a CSS counter is used to label the checkboxes (actually a ordered list will be fine).</p>
<hr />
Update</p>
<p>2009-11-26: <a href="http://www.chromeexperiments.com/detail/gear/">Gear is now on Chrome Experiments!</a> Being the first CSS-only experiment over there <img src='http://blog.onthewings.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=aH_i50xQoiY:Pb5ny8CDZVQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=aH_i50xQoiY:Pb5ny8CDZVQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=aH_i50xQoiY:Pb5ny8CDZVQ:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/aH_i50xQoiY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2009/11/24/css-only-experiements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.onthewings.net/2009/11/24/css-only-experiements/</feedburner:origLink></item>
		<item>
		<title>AS3/JS string concatenation methods performace test</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/I95tOJR9N-Q/</link>
		<comments>http://blog.onthewings.net/2009/10/09/as3-js-string-concatenation-methods-performace-test/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 15:25:17 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[experiment]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=584</guid>
		<description><![CDATA[
			
				
			
		When writing BrainFlash, I was thinking if the string concatenations for program output will slow down the whole interpreter. That is because I was once hit that a year ago when dealing with XML.
I asked for better handling methods over StackOverflow. It is interesting that some of the answers shown that using &#8220;+=&#8221; is already [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F10%2F09%2Fas3-js-string-concatenation-methods-performace-test%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F10%2F09%2Fas3-js-string-concatenation-methods-performace-test%2F&amp;source=andy_li&amp;style=compact" height="61" width="50" />
			</a>
		</div><p>When writing <a href="http://blog.onthewings.net/2009/10/08/brainflash-the-as3-brainfuck-interpreter/">BrainFlash</a>, I was thinking if the string concatenations for program output will slow down the whole interpreter. That is because I was once hit that a year ago when dealing with XML.</p>
<p>I asked for better handling methods over <a href="http://stackoverflow.com/questions/1536260/string-concatenation-is-extremly-slow-when-input-is-large">StackOverflow</a>. It is interesting that some of the answers shown that using &#8220;+=&#8221; is already the fastest. But I still want to know more about that, so I wrote my own simple testing program, which is below:</p>
<h3>ActionScript version</h3>
<p>
<object width="600" height="400">
<param name="movie" value="http://blog.onthewings.net/wp-content/uploads/2009/10/test.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="opaque"></param>
<param name="menu" value="true"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="600" height="400" src="http://blog.onthewings.net/wp-content/uploads/2009/10/test.swf" quality="high" bgcolor="#FFFFFF" wmode="opaque" menu="true" allowFullScreen="true" ></embed>
</object>
<br />
<a href="http://blog.onthewings.net/wp-content/uploads/2009/10/test.zip">source code</a></p>
<p>Methods used are:</p>
<ol>
<li>str += concateString;</li>
<li>str = str.concat(concateString);</li>
<li>array.push(concateString); &#8230; str = array.join(&#8220;&#8221;);</li>
<li>vector.push(concateString); &#8230; str = vector.join(&#8220;&#8221;);</li>
<li>byteArray.writeUTFBytes(concateString); &#8230; str = byteArray.readUTFBytes(byteArray.length);</li>
<li>byteArray.writeMultiByte(concateString,&#8221;us-ascii&#8221;); &#8230; str = byteArray.readMultiByte(str.length,&#8221;us-ascii&#8221;);</li>
</ol>
<p>The result shows that fastest method is using &#8220;+=&#8221;, but using Array/Vector is still very close to it. Using ByteArray is slow and with ASCII instead of UTF-8 is even slower&#8230;</p>
<p>And all the methods are performed reasonably fast, what is slow is when showing the resulting string on TextArea&#8230; It takes a few seconds! But when it is drawn, run it again and it will become normal speed, maybe there is some caching?</p>
<h3>JavaScript version</h3>
<p>I coded a JavaScript port too. <a href="http://blog.onthewings.net/wp-content/uploads/2009/10/string-concatenation-methods-performace-test.html">See it here.</a></p>
<p>Methods used are:</p>
<ol>
<li>str += concateString;</li>
<li>str = str.concat(concateString);</li>
<li>array.push(concateString); &#8230; str = array.join(&#8220;&#8221;);</li>
</ol>
<p>Interesting enough, the result is very similar to AS3. It is the opposite of what we believe using the Array trick will let it performs faster. &#8220;+=&#8221; is the fastest in most cases, if not, that&#8217;s not much difference.</p>
<p>I&#8217;ve only tested in IE8(Win), Firefox 3 (Win/Mac), Safari 4 (Win/Mac), Chrome 3 (Win). The really really really interesting part is in Chrome 3, using the concat method of String is x7000 SLOWER than the other two!! What are your results?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=I95tOJR9N-Q:V2wQwqZ0TQw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=I95tOJR9N-Q:V2wQwqZ0TQw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=I95tOJR9N-Q:V2wQwqZ0TQw:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/I95tOJR9N-Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2009/10/09/as3-js-string-concatenation-methods-performace-test/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.onthewings.net/2009/10/09/as3-js-string-concatenation-methods-performace-test/</feedburner:origLink></item>
		<item>
		<title>BrainFlash, the AS3 BrainFuck interpreter</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/3u_FNgbGUMM/</link>
		<comments>http://blog.onthewings.net/2009/10/08/brainflash-the-as3-brainfuck-interpreter/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 19:11:13 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[experiment]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=569</guid>
		<description><![CDATA[
			
				
			
		If you haven&#8217;t heard about Brainfuck yet, it is a famous esoteric programming language. If you want to know why it has such a name take a look at its hello-world program source code (from wikipedia):

+++ +++ +++ +           initialize counter (cell #0) to 10
[ [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F10%2F08%2Fbrainflash-the-as3-brainfuck-interpreter%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F10%2F08%2Fbrainflash-the-as3-brainfuck-interpreter%2F&amp;source=andy_li&amp;style=compact" height="61" width="50" />
			</a>
		</div><p>If you haven&#8217;t heard about <a href="http://www.muppetlabs.com/~breadbox/bf/">Brainfuck</a> yet, it is a famous esoteric programming language. If you want to know why it has such a name take a look at its hello-world program source code (from <a href="http://en.wikipedia.org/wiki/Brainfuck#Hello_World.21">wikipedia</a>):</p>

<div class="wp_syntax"><div class="code"><pre class="brainfuck" style="font-family:monospace;">+++ +++ +++ +           initialize counter (cell #0) to 10
[                       use loop to set the next four cells to 70/100/30/10
    &gt; +++ +++ +             add  7 to cell #1
    &gt; +++ +++ +++ +         add 10 to cell #2
    &gt; +++                   add  3 to cell #3
    &gt; +                     add  1 to cell #4
    &lt;&lt;&lt; &lt; -                 decrement counter (cell #0)
]
&gt;++ .                   print 'H'
&gt;+.                     print 'e'
+++ +++ +.              print 'l'
.                       print 'l'
+++ .                   print 'o'
&gt;++ .                   print ' '
&lt;&lt;+ +++ +++ +++ +++ ++. print 'W'
&gt;.                      print 'o'
+++ .                   print 'r'
--- --- .               print 'l'
--- --- --.             print 'd'
&gt;+.                     print '!'
&gt;.                      print '\n'</pre></div></div>

<p>the above program can be written as:</p>

<div class="wp_syntax"><div class="code"><pre class="brainfuck" style="font-family:monospace;">++++++++++[&gt;+++++++&gt;++++++++++&gt;+++&gt;+&lt;&lt;&lt;&lt;-]&gt;++.&gt;+.+++++++..+++.&gt;++.&lt;&lt;+++++++++++++++.&gt;.+++.------.--------.&gt;+.&gt;.</pre></div></div>

<p>So now you should know how lovely the language is and why I need to write a interpreter in Flash: now you can manipulate a ByteArray with BrainFuck code!!! And ya, the name of my interpreter is even more friendly than the language&#8217;s name! <img src='http://blog.onthewings.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://blog.onthewings.net/wp-content/uploads/2009/10/brainflashDemo.html">Here is the result demo</a> (<a href="http://blog.onthewings.net/wp-content/uploads/2009/10/brainflashDemo.zip">source code here</a>), type in a program and its input then click run. The default program is to add up two single-digit integers. And the output is correct only if the sum is single-digit too. And again the code is from wikipedia. You may find other BrainFuck source code to test from <a href="http://esoteric.sange.fi/brainfuck/bf-source/prog/">Panu Kalliokoski&#8217;s Brainfuck Archive</a>.</p>
<p>The interpreter is written by only looking at its command description. There are some bugs as I know. For example when inputting multiple lines, the output may have wrong formating. And it can not have dynamic input like having inputs in a infinite loop. Actually any infinite loop will freeze your browser.</p>
<p>I don&#8217;t think I will go to improve it anytime soon. So please, don&#8217;t use it in production (will anyone??).</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=3u_FNgbGUMM:6owUxOLT-Yk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=3u_FNgbGUMM:6owUxOLT-Yk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=3u_FNgbGUMM:6owUxOLT-Yk:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/3u_FNgbGUMM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2009/10/08/brainflash-the-as3-brainfuck-interpreter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.onthewings.net/2009/10/08/brainflash-the-as3-brainfuck-interpreter/</feedburner:origLink></item>
		<item>
		<title>Pixel Bender port of Scale2x and Scale3x</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/ovpkYY2n2tM/</link>
		<comments>http://blog.onthewings.net/2009/09/28/pixel-bender-port-of-scale2x-and-scale3x/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 19:35:46 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Pixel Bender]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=548</guid>
		<description><![CDATA[
			
				
			
		
When I first saw the Scale2x, scale3x AS3 I am impressed. The algorithm is from scale2x sourceforge project and the as3 port is coded as a class that is very easy to reuse. Surely the AS3 port author nicoptere can make a PB port too as you may find out many PB cool stuff over [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F09%2F28%2Fpixel-bender-port-of-scale2x-and-scale3x%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F09%2F28%2Fpixel-bender-port-of-scale2x-and-scale3x%2F&amp;source=andy_li&amp;style=compact" height="61" width="50" />
			</a>
		</div><p><img class="alignnone size-full wp-image-555" title="scale2x" src="http://blog.onthewings.net/wp-content/uploads/2009/09/scale2x.png" alt="scale2x" width="515" height="387" /></p>
<p>When I first saw the <a href="http://en.nicoptere.net/?p=6">Scale2x, scale3x AS3</a> I am impressed. The algorithm is from <a href="http://scale2x.sourceforge.net/algorithm.html">scale2x sourceforge project</a> and the as3 port is coded as a class that is very easy to reuse. Surely the AS3 port author nicoptere can make a PB port too as you may find out many PB cool stuff over <a href="http://en.nicoptere.net/">his blog</a>, but my pixel bending desire force me to do it myself <img src='http://blog.onthewings.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Here below the video shows my demo. I get a camera capture stream and used <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;extid=1760025">Posterizer which is downloaded from Pixel Bender Exchange</a> to convert the image to 4-color-only, and than use the scale2x filter to enlarge the low resolution capture. The top-left corner thumbnail-like image is actually the original 1:1 input(160*120).</p>
<p><a href="http://blog.onthewings.net/2009/09/28/pixel-bender-port-of-scale2x-and-scale3x/"><em>Click here to view the embedded video.</em></a></p>
<p>It is quite interesting to see for scale2x, PB&#8217;s version nearly doubles the performance of AS3&#8217;s. But for scale3x, there is not much different between PB and AS3. I think it is because scale3x has too many if-else which PB is not strong at.</p>
<p>BTW, I discovered a bug in PB while coding this. The bug make my code much longer as I work-a-round it&#8230; I reported it to the <a href="http://forums.adobe.com/thread/497374">PB forum</a>.</p>
<p><a href="http://blog.onthewings.net/wp-content/uploads/2009/09/pbScaleX.html">Demo app</a></p>
<p><a href="http://blog.onthewings.net/wp-content/uploads/2009/09/pbScaleX.zip">Demo app&#8217;s Flex project with Pixel Bender source</a> (The shorter but buggy versions are included too.)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=ovpkYY2n2tM:dIELpo9nJ8c:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=ovpkYY2n2tM:dIELpo9nJ8c:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=ovpkYY2n2tM:dIELpo9nJ8c:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/ovpkYY2n2tM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2009/09/28/pixel-bender-port-of-scale2x-and-scale3x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.onthewings.net/2009/09/28/pixel-bender-port-of-scale2x-and-scale3x/</feedburner:origLink></item>
		<item>
		<title>Presentation slide for Software Freedom Day HK 2009</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/zmSUcZZFU7M/</link>
		<comments>http://blog.onthewings.net/2009/09/19/presentation-slide-for-software-freedom-day-hk-2009/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 12:39:07 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[STK in AS3]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=538</guid>
		<description><![CDATA[
			
				
			
		Just get back from Software Freedom Day (Hong Kong) 2009. Very glad to be invited by Ben to join the event as a speaker  
I am one of the speakers in the session &#8220;Open Source developers from Hong Kong&#8221;. I presented STK in AS3 (which is started by me) and a few more great [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F09%2F19%2Fpresentation-slide-for-software-freedom-day-hk-2009%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F09%2F19%2Fpresentation-slide-for-software-freedom-day-hk-2009%2F&amp;source=andy_li&amp;style=compact" height="61" width="50" />
			</a>
		</div><p>Just get back from <a href="http://wiki.opensource.hk/index.php/Software_Freedom_Day_2009%2C_Hong_Kong">Software Freedom Day (Hong Kong) 2009</a>. Very glad to be invited by Ben to join the event as a speaker <img src='http://blog.onthewings.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I am one of the speakers in the session &#8220;Open Source developers from Hong Kong&#8221;. I presented <a href="http://code.google.com/p/stk-in-as3/">STK in AS3</a> (which is started by me) and a few more great open source project related to media/art. Here below is the slide I used during presentation.</p>
<div id="__ss_2021666" style="width: 425px; text-align: left;"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="Open Source Development And Media" href="http://www.slideshare.net/andy_li/open-source-development-and-media-software-fr">Open Source Development And Media</a><object style="margin:0px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=opensourcedevelopmentandmediasoftwarefr-090919072826-phpapp02&amp;stripped_title=open-source-development-and-media-software-fr" /><param name="allowfullscreen" value="true" /><embed style="margin:0px" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=opensourcedevelopmentandmediasoftwarefr-090919072826-phpapp02&amp;stripped_title=open-source-development-and-media-software-fr" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/andy_li">Andy Li</a>.</div>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=zmSUcZZFU7M:kOblhBJWSHg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=zmSUcZZFU7M:kOblhBJWSHg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=zmSUcZZFU7M:kOblhBJWSHg:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/zmSUcZZFU7M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2009/09/19/presentation-slide-for-software-freedom-day-hk-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.onthewings.net/2009/09/19/presentation-slide-for-software-freedom-day-hk-2009/</feedburner:origLink></item>
		<item>
		<title>Bicubic resampling by Pixel Bender</title>
		<link>http://feedproxy.google.com/~r/AndyLi/~3/NI7wOMHfG6w/</link>
		<comments>http://blog.onthewings.net/2009/08/25/bicubic-resampling-by-pixel-bender/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 23:51:18 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Pixel Bender]]></category>

		<guid isPermaLink="false">http://blog.onthewings.net/?p=504</guid>
		<description><![CDATA[
			
				
			
		There is bilinear resampling by Pixel Bender already, why not bicubic too?
With the very helpful Java implementation, I can get bicubic resampling running in Pixel Bender in hours.
Here is my result, along with the resampling results in PhotoShop as a comparison:








There is some difference with PhotoShop&#8217;s versions (below), hope it&#8217;s not my mistake&#8230;








My codes can [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F08%2F25%2Fbicubic-resampling-by-pixel-bender%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.onthewings.net%2F2009%2F08%2F25%2Fbicubic-resampling-by-pixel-bender%2F&amp;source=andy_li&amp;style=compact" height="61" width="50" />
			</a>
		</div><p>There is <a href="http://www.brooksandrus.com/blog/2009/03/11/bilinear-resampling-with-flash-player-and-pixel-bender/">bilinear resampling by Pixel Bender</a> already, why not bicubic too?</p>
<p>With the very helpful <a href="http://www.paulinternet.nl/?page=bicubic">Java implementation</a>, I can get bicubic resampling running in Pixel Bender in hours.</p>
<p>Here is my result, along with the resampling results in PhotoShop as a comparison:</p>
<table style="width: 100%;" border="0">
<tbody>
<tr>
<td>
<div id="attachment_506" class="wp-caption alignleft" style="width: 210px"><a href="http://blog.onthewings.net/wp-content/uploads/2009/08/16color.png"><img class="size-full wp-image-506 " title="16color image" src="http://blog.onthewings.net/wp-content/uploads/2009/08/16color.png" alt="Source image (4x4), scaled by your browser)" width="200" height="200" /></a><p class="wp-caption-text">Source image (size 4x4, scaled by your browser)</p></div>
<div id="attachment_507" class="wp-caption alignleft" style="width: 210px"><a href="http://blog.onthewings.net/wp-content/uploads/2009/08/16color_psNearest.png"><img class="size-full wp-image-507 " title="16color_psNearest" src="http://blog.onthewings.net/wp-content/uploads/2009/08/16color_psNearest.png" alt="Source image enlarged in PS (nearest neighbor)" width="200" height="200" /></a><p class="wp-caption-text">Source image enlarged by PS (nearest neighbor)</p></div>
<div id="attachment_508" class="wp-caption alignleft" style="width: 210px"><a href="http://blog.onthewings.net/wp-content/uploads/2009/08/16color_pbBicubic.png"><img class="size-full wp-image-508 " title="16color_pbBicubic" src="http://blog.onthewings.net/wp-content/uploads/2009/08/16color_pbBicubic.png" alt="Bicubic resampling by Pixel Bender" width="200" height="200" /></a><p class="wp-caption-text">Bicubic resampling by Pixel Bender</p></div></td>
</tr>
</tbody>
</table>
<p>There is some difference with PhotoShop&#8217;s versions (below), hope it&#8217;s not my mistake&#8230;</p>
<table style="width: 100%;" border="0">
<tbody>
<tr>
<td>
<p><div id="attachment_509" class="wp-caption alignleft" style="width: 210px"><a href="http://blog.onthewings.net/wp-content/uploads/2009/08/16color_psBicubic.png"><img class="size-full wp-image-509 " title="16color_psBicubic" src="http://blog.onthewings.net/wp-content/uploads/2009/08/16color_psBicubic.png" alt="Bicubic resampling by PhotoShop." width="200" height="200" /></a><p class="wp-caption-text">Bicubic resampling by PhotoShop.</p></div>
<div id="attachment_510" class="wp-caption alignleft" style="width: 210px"><a href="http://blog.onthewings.net/wp-content/uploads/2009/08/16color_psBicubicSmoother.png"><img class="size-full wp-image-510 " title="16color_psBicubicSmoother" src="http://blog.onthewings.net/wp-content/uploads/2009/08/16color_psBicubicSmoother.png" alt="Bicubic smoother in PhotoShop" width="200" height="200" /></a><p class="wp-caption-text">Bicubic smoother by PhotoShop</p></div>
<div id="attachment_511" class="wp-caption alignleft" style="width: 210px"><a href="http://blog.onthewings.net/wp-content/uploads/2009/08/16color_psBicubicShaper.png"><img class="size-full wp-image-511 " title="16color_psBicubicShaper" src="http://blog.onthewings.net/wp-content/uploads/2009/08/16color_psBicubicShaper.png" alt="Bicubic sharper in PhotoShop" width="200" height="200" /></a><p class="wp-caption-text">Bicubic sharper by PhotoShop</p></div></td>
</tr>
</tbody>
</table>
<p>My codes can be downloaded below:<br />
<a style="text-decoration:line-through" href="http://blog.onthewings.net/wp-content/uploads/2009/08/bicubicResampling.zip">Bicubic resampling sample program source (with PB source) </a></p>
<hr />
Update:<br />
Notified by author of the Java version, the Java code was wrong and has been updated. Here below is my updated code:<br />
<a href='http://blog.onthewings.net/wp-content/uploads/2010/03/bicubicResampling.zip'>Bicubic resampling sample program source (with PB source)</a></p>
<p><div id="attachment_724" class="wp-caption alignnone" style="width: 210px"><a href="http://blog.onthewings.net/wp-content/uploads/2009/08/pbBicubic.png"><img src="http://blog.onthewings.net/wp-content/uploads/2009/08/pbBicubic.png" alt="" title="updated output of PB" width="200" height="200" class="size-full wp-image-724" /></a><p class="wp-caption-text">updated output of PB</p></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AndyLi?a=NI7wOMHfG6w:ug7ndhC64pk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/AndyLi?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/AndyLi?a=NI7wOMHfG6w:ug7ndhC64pk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/AndyLi?i=NI7wOMHfG6w:ug7ndhC64pk:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/AndyLi/~4/NI7wOMHfG6w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.onthewings.net/2009/08/25/bicubic-resampling-by-pixel-bender/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://blog.onthewings.net/2009/08/25/bicubic-resampling-by-pixel-bender/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 2.219 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-03-07 05:55:15 -->
