<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Canvas Color Cycling</title>
	<atom:link href="http://ajaxian.com/archives/canvas-color-cycling/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/canvas-color-cycling</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: RobG</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284828</link>
		<dc:creator>RobG</dc:creator>
		<pubDate>Thu, 29 Jul 2010 05:40:32 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284828</guid>
		<description>Cool, but not very practical. Zoom in on the graphics and they run like molasis in winter. Crashed Safari on my iPad after about 20 seconds. :-(</description>
		<content:encoded><![CDATA[<p>Cool, but not very practical. Zoom in on the graphics and they run like molasis in winter. Crashed Safari on my iPad after about 20 seconds. :-(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ProPuke</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284822</link>
		<dc:creator>ProPuke</dc:creator>
		<pubDate>Wed, 28 Jul 2010 02:58:04 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284822</guid>
		<description>@travisalmand - The optimisation has not been &quot;recreated&quot;. Palette cycling allowed graphics on the screen to be updated without being redrawn. This was from back in the day when blitting graphics onto the screen was computationally expensive &amp; memory for storing animations was a preciously hoarded commodity (and computers stored a lookup table for colours, rather than supporting &quot;high colour&quot; modes).
This has no relation to that any more.
Now we are emulating the rotation in software, on a javascript virtual machine, no-less - It&#039;s humorously highlevel &amp; abstract (which was what @jgw was referring to)
It is, however, wonderfully nostalgic &amp; excellently executed.
And damn! Mark Ferrari&#039;s art is niiiice!
@hansschmucker gets a step further by making the browser perform the rotation, instead (neat idea!). It&#039;s still not /quite/ the same mind-you, but it&#039;s closer :]</description>
		<content:encoded><![CDATA[<p>@travisalmand &#8211; The optimisation has not been &#8220;recreated&#8221;. Palette cycling allowed graphics on the screen to be updated without being redrawn. This was from back in the day when blitting graphics onto the screen was computationally expensive &amp; memory for storing animations was a preciously hoarded commodity (and computers stored a lookup table for colours, rather than supporting &#8220;high colour&#8221; modes).<br />
This has no relation to that any more.<br />
Now we are emulating the rotation in software, on a javascript virtual machine, no-less &#8211; It&#8217;s humorously highlevel &amp; abstract (which was what @jgw was referring to)<br />
It is, however, wonderfully nostalgic &amp; excellently executed.<br />
And damn! Mark Ferrari&#8217;s art is niiiice!<br />
@hansschmucker gets a step further by making the browser perform the rotation, instead (neat idea!). It&#8217;s still not /quite/ the same mind-you, but it&#8217;s closer :]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gonchuki</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284820</link>
		<dc:creator>gonchuki</dc:creator>
		<pubDate>Tue, 27 Jul 2010 19:53:50 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284820</guid>
		<description>This is absolutely brilliant. A nice recreation of the technique augmented by the quality of those astounding illustrations.  
I used a similar technique in Flash a couple years ago (modifying the PLTE chunk in a PNG) but never reached production as the set of images I was handling was immense and unpredictable (something along the lines of hundreds of animations at 15-30 frames each that were 3D renders), which meant generating each palette was not a simple task.</description>
		<content:encoded><![CDATA[<p>This is absolutely brilliant. A nice recreation of the technique augmented by the quality of those astounding illustrations.<br />
I used a similar technique in Flash a couple years ago (modifying the PLTE chunk in a PNG) but never reached production as the set of images I was handling was immense and unpredictable (something along the lines of hundreds of animations at 15-30 frames each that were 3D renders), which meant generating each palette was not a simple task.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antimatter15</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284819</link>
		<dc:creator>antimatter15</dc:creator>
		<pubDate>Tue, 27 Jul 2010 17:30:18 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284819</guid>
		<description>I recently made (erm, ported) a pure JS  canvas -&gt; animated GIF converter (http://github.com/antimatter15/jsgif) so I just did a few changes to canvascycle and tried making it into an animated gif: http://github.com/antimatter15/jsgif/blob/master/Demos/canvascycle/gif.gif

The palettes doesn&#039;t seem right, but it&#039;s still interesting.</description>
		<content:encoded><![CDATA[<p>I recently made (erm, ported) a pure JS  canvas -&gt; animated GIF converter (<a href="http://github.com/antimatter15/jsgif" rel="nofollow">http://github.com/antimatter15/jsgif</a>) so I just did a few changes to canvascycle and tried making it into an animated gif: <a href="http://github.com/antimatter15/jsgif/blob/master/Demos/canvascycle/gif.gif" rel="nofollow">http://github.com/antimatter15/jsgif/blob/master/Demos/canvascycle/gif.gif</a></p>
<p>The palettes doesn&#8217;t seem right, but it&#8217;s still interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jhuckaby</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284818</link>
		<dc:creator>jhuckaby</dc:creator>
		<pubDate>Tue, 27 Jul 2010 16:15:22 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284818</guid>
		<description>@hansschmucker - I am impressed at how well your technique works, especially considering it isn&#039;t affected by the number of pixels that have to be updated.  I honestly considered that when I first started working on this demo (I was thinking GIF images, but same basic idea, manipulate the binary palette in memory and have the browser reload it), but totally dismissed it thinking it would be far too slow for the browser to &quot;reinterpret&quot; a binary image for every frame.  I was very wrong.  Nice work!</description>
		<content:encoded><![CDATA[<p>@hansschmucker &#8211; I am impressed at how well your technique works, especially considering it isn&#8217;t affected by the number of pixels that have to be updated.  I honestly considered that when I first started working on this demo (I was thinking GIF images, but same basic idea, manipulate the binary palette in memory and have the browser reload it), but totally dismissed it thinking it would be far too slow for the browser to &#8220;reinterpret&#8221; a binary image for every frame.  I was very wrong.  Nice work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Breton</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284817</link>
		<dc:creator>Breton</dc:creator>
		<pubDate>Tue, 27 Jul 2010 13:42:45 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284817</guid>
		<description>and also, thanks for pointing out these images by Mark Ferrari. It will take me some time to figure out what&#039;s going on in these images! how does it work!?</description>
		<content:encoded><![CDATA[<p>and also, thanks for pointing out these images by Mark Ferrari. It will take me some time to figure out what&#8217;s going on in these images! how does it work!?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Breton</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284816</link>
		<dc:creator>Breton</dc:creator>
		<pubDate>Tue, 27 Jul 2010 13:41:34 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284816</guid>
		<description>The iphone&#039;s application cache can only hold 5mb per &quot;app&quot;. Even if this technique is not computationally efficient, it is still efficient in terms of space. Look at how the same image data can be reused to show different times of day, and different weather conditions, simply by changing the palette. Look also at the fact that such animations can be achieved without storing multiple frames. We&#039;re talking 5mb, including graphics, sounds, text, and javascript. Yeah, of course let&#039;s revisit old techniques!</description>
		<content:encoded><![CDATA[<p>The iphone&#8217;s application cache can only hold 5mb per &#8220;app&#8221;. Even if this technique is not computationally efficient, it is still efficient in terms of space. Look at how the same image data can be reused to show different times of day, and different weather conditions, simply by changing the palette. Look also at the fact that such animations can be achieved without storing multiple frames. We&#8217;re talking 5mb, including graphics, sounds, text, and javascript. Yeah, of course let&#8217;s revisit old techniques!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: travisalmand</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284815</link>
		<dc:creator>travisalmand</dc:creator>
		<pubDate>Tue, 27 Jul 2010 13:22:04 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284815</guid>
		<description>@igw - Are you saying if someone&#039;s first attempt at recreating an optimization method for a new platform is not more efficient than the original implementation then that person shouldn&#039;t bother? Should we just immediately dismiss all research efforts then?</description>
		<content:encoded><![CDATA[<p>@igw &#8211; Are you saying if someone&#8217;s first attempt at recreating an optimization method for a new platform is not more efficient than the original implementation then that person shouldn&#8217;t bother? Should we just immediately dismiss all research efforts then?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crock</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284814</link>
		<dc:creator>crock</dc:creator>
		<pubDate>Tue, 27 Jul 2010 13:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284814</guid>
		<description>The artist, Mark Ferrari, is brilliant.</description>
		<content:encoded><![CDATA[<p>The artist, Mark Ferrari, is brilliant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hansschmucker</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284813</link>
		<dc:creator>hansschmucker</dc:creator>
		<pubDate>Tue, 27 Jul 2010 12:33:15 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284813</guid>
		<description>Changed it a bit (the image is now delivered base64 encoded) and now it works in Opera as well (which means that it now works on all modern browsers).... I&#039;ve also added a big 512x1024 image to show the speed. Doesn&#039;t look any better, though. Joe, where did you get that image?</description>
		<content:encoded><![CDATA[<p>Changed it a bit (the image is now delivered base64 encoded) and now it works in Opera as well (which means that it now works on all modern browsers)&#8230;. I&#8217;ve also added a big 512&#215;1024 image to show the speed. Doesn&#8217;t look any better, though. Joe, where did you get that image?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hansschmucker</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284812</link>
		<dc:creator>hansschmucker</dc:creator>
		<pubDate>Tue, 27 Jul 2010 10:49:19 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284812</guid>
		<description>Actually, we can make it as efficient as it was back then :) Browsers support any number of image formats with palettes, we just have to alter them and let the browser do the rest.
Here&#039;s a simple example that works in Firefox, Safari and Chrome (not Opera yet... it&#039;s either atob or the fact that I&#039;m using BMPs).
It loads a little slow since I&#039;m directly loading the BMP with a binary XMLHttpRequest and that means going through each byte and checking the range, but that could quickly be replaced.
Once it loads, it just changes the bytes in the BMP header that represent the palette and lets the browser (which is A LOT faster at doing this kind of stuff) worry about how to display a paletted image.
I don&#039;t have a nice image like Joe, so you better not have epilepsy if you intend to watch this :)

http://www.tapper-ware.net/data/devel/web/apps/JS.ColorCycle/</description>
		<content:encoded><![CDATA[<p>Actually, we can make it as efficient as it was back then :) Browsers support any number of image formats with palettes, we just have to alter them and let the browser do the rest.<br />
Here&#8217;s a simple example that works in Firefox, Safari and Chrome (not Opera yet&#8230; it&#8217;s either atob or the fact that I&#8217;m using BMPs).<br />
It loads a little slow since I&#8217;m directly loading the BMP with a binary XMLHttpRequest and that means going through each byte and checking the range, but that could quickly be replaced.<br />
Once it loads, it just changes the bytes in the BMP header that represent the palette and lets the browser (which is A LOT faster at doing this kind of stuff) worry about how to display a paletted image.<br />
I don&#8217;t have a nice image like Joe, so you better not have epilepsy if you intend to watch this :)</p>
<p><a href="http://www.tapper-ware.net/data/devel/web/apps/JS.ColorCycle/" rel="nofollow">http://www.tapper-ware.net/data/devel/web/apps/JS.ColorCycle/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DeanSJones</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284810</link>
		<dc:creator>DeanSJones</dc:creator>
		<pubDate>Tue, 27 Jul 2010 03:35:41 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284810</guid>
		<description>Interesting... brought back some memories. Color Cycling, aka color map manipulation, along with bit-plane operations, was pretty standard even in the 80&#039;s. It wasn&#039;t just a cute optimization then, it was the ONLY way to render some complex graphics in near-time - because you could change the display with NO PIXEL writes, just a color map flip or bit-plane write to the framebuffer. Ahhh, Good Times.</description>
		<content:encoded><![CDATA[<p>Interesting&#8230; brought back some memories. Color Cycling, aka color map manipulation, along with bit-plane operations, was pretty standard even in the 80&#8242;s. It wasn&#8217;t just a cute optimization then, it was the ONLY way to render some complex graphics in near-time &#8211; because you could change the display with NO PIXEL writes, just a color map flip or bit-plane write to the framebuffer. Ahhh, Good Times.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jgw</title>
		<link>http://ajaxian.com/archives/canvas-color-cycling/comment-page-1#comment-284809</link>
		<dc:creator>jgw</dc:creator>
		<pubDate>Tue, 27 Jul 2010 00:27:32 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=9881#comment-284809</guid>
		<description>I&#039;m impressed that this works as well as it does, and definitely nostalgic for the art style. But palette cycling was an optimization trick, not an end to itself. Am I the only one who finds it rather odd that we&#039;re reproducing a technique like this in a way that is probably orders of magnitude less efficient than in its original form?!</description>
		<content:encoded><![CDATA[<p>I&#8217;m impressed that this works as well as it does, and definitely nostalgic for the art style. But palette cycling was an optimization trick, not an end to itself. Am I the only one who finds it rather odd that we&#8217;re reproducing a technique like this in a way that is probably orders of magnitude less efficient than in its original form?!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

