<?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: BitmapData Colour Palette</title>
	<atom:link href="http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette</link>
	<description>Art + Technology</description>
	<lastBuildDate>Thu, 06 Oct 2011 13:58:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Allie</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/comment-page-5#comment-9825</link>
		<dc:creator>Allie</dc:creator>
		<pubDate>Fri, 01 Jul 2011 22:01:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=195#comment-9825</guid>
		<description>Know this is old, but it&#039;s exactly what I was looking for and has a *great* walkthrough. I appreciate it!</description>
		<content:encoded><![CDATA[<p>Know this is old, but it&#8217;s exactly what I was looking for and has a *great* walkthrough. I appreciate it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/comment-page-5#comment-9400</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Mon, 17 Jan 2011 10:11:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=195#comment-9400</guid>
		<description>HI.
This is amazing work. Very well made coding + tutorial.
Im trying to embed it with a photo album, so when u switch to another picture, the colors shows.
Im adding the images from a xml file..
any help here?
Thanks alot for the great work so far. Tim</description>
		<content:encoded><![CDATA[<p>HI.<br />
This is amazing work. Very well made coding + tutorial.<br />
Im trying to embed it with a photo album, so when u switch to another picture, the colors shows.<br />
Im adding the images from a xml file..<br />
any help here?<br />
Thanks alot for the great work so far. Tim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hcsaba</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/comment-page-5#comment-9394</link>
		<dc:creator>Hcsaba</dc:creator>
		<pubDate>Sun, 09 Jan 2011 19:28:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=195#comment-9394</guid>
		<description>Hi, it is a very good job. I can use the unique colors in my second hobby.
The first is the programming. :) Thanks.

But I have a little problem. So I think You can help me. Because Google don&#039;t help.
How to put my 16 unique colors to a paletteMap. And apply to bitmapdata.
My code work fine with threshold but very slowly.

for (var i=0; i&lt;actcolsdb; i++) {
    var c1:uint=actcols[i].colour;
    olddist=1000;
    for (var j=0; j&gt; 16) - ((c2 &amp; 0xff0000)&gt;&gt; 16));
       var gx:uint = Math.abs(((c1 &amp; 0xff00) &gt;&gt; 8) - ((c2 &amp; 0xff00) &gt;&gt; 8));
       var bx:uint = Math.abs((c1 &amp; 0xff) - (c2 &amp; 0xff));
       dist=Math.sqrt(rx*rx+gx*gx+bx*bx);
             if (dist&lt;=olddist) {
	  olddist=dist;
	  id=j;
             }
}
Image.threshold(Image,Image.rect,new Point(0,0),&quot;==&quot;,returnARGB(c1,255),returnARGB(m_colours[id],255));
}

Thanks for reply and sorry my bad English.</description>
		<content:encoded><![CDATA[<p>Hi, it is a very good job. I can use the unique colors in my second hobby.<br />
The first is the programming. :) Thanks.</p>
<p>But I have a little problem. So I think You can help me. Because Google don&#8217;t help.<br />
How to put my 16 unique colors to a paletteMap. And apply to bitmapdata.<br />
My code work fine with threshold but very slowly.</p>
<p>for (var i=0; i&lt;actcolsdb; i++) {<br />
    var c1:uint=actcols[i].colour;<br />
    olddist=1000;<br />
    for (var j=0; j&gt; 16) &#8211; ((c2 &amp; 0xff0000)&gt;&gt; 16));<br />
       var gx:uint = Math.abs(((c1 &amp; 0xff00) &gt;&gt; 8) &#8211; ((c2 &amp; 0xff00) &gt;&gt; 8));<br />
       var bx:uint = Math.abs((c1 &amp; 0xff) &#8211; (c2 &amp; 0xff));<br />
       dist=Math.sqrt(rx*rx+gx*gx+bx*bx);<br />
             if (dist&lt;=olddist) {<br />
	  olddist=dist;<br />
	  id=j;<br />
             }<br />
}<br />
Image.threshold(Image,Image.rect,new Point(0,0),&quot;==&quot;,returnARGB(c1,255),returnARGB(m_colours[id],255));<br />
}</p>
<p>Thanks for reply and sorry my bad English.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: danbo</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/comment-page-5#comment-9382</link>
		<dc:creator>danbo</dc:creator>
		<pubDate>Thu, 23 Dec 2010 14:22:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=195#comment-9382</guid>
		<description>Nice work. I&#039;m working on maps, your appplication permits many works. 
Very good!</description>
		<content:encoded><![CDATA[<p>Nice work. I&#8217;m working on maps, your appplication permits many works.<br />
Very good!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JH</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/comment-page-5#comment-9369</link>
		<dc:creator>JH</dc:creator>
		<pubDate>Sat, 18 Dec 2010 17:08:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=195#comment-9369</guid>
		<description>Please delete my last comment, I did something wrong.
Greets, J.

If you want a working example for flex/air just let me know by email and i will send you the example for your site.</description>
		<content:encoded><![CDATA[<p>Please delete my last comment, I did something wrong.<br />
Greets, J.</p>
<p>If you want a working example for flex/air just let me know by email and i will send you the example for your site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JH</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/comment-page-5#comment-9354</link>
		<dc:creator>JH</dc:creator>
		<pubDate>Tue, 14 Dec 2010 10:54:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=195#comment-9354</guid>
		<description>Hi,
Thank you, that fixed it.
Little question;
I am using your code in flex/air. The ColourUtils.as file is exactly the same, the image, the amount of colors in the palette and the tolerance are the same, but i don&#039;t get the same colors as in your example... the colors i get doesn&#039;t even match the image.. 
Any idea?
I can provide a flex example, just let me know by mail.
Greets, J.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thank you, that fixed it.<br />
Little question;<br />
I am using your code in flex/air. The ColourUtils.as file is exactly the same, the image, the amount of colors in the palette and the tolerance are the same, but i don&#8217;t get the same colors as in your example&#8230; the colors i get doesn&#8217;t even match the image..<br />
Any idea?<br />
I can provide a flex example, just let me know by mail.<br />
Greets, J.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soulwire</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/comment-page-5#comment-9316</link>
		<dc:creator>Soulwire</dc:creator>
		<pubDate>Tue, 30 Nov 2010 10:00:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=195#comment-9316</guid>
		<description>You&#039;ll need CS3 or above to open it I&#039;m afraid.</description>
		<content:encoded><![CDATA[<p>You&#8217;ll need CS3 or above to open it I&#8217;m afraid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thanks! &#124; omarrr</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/comment-page-5#comment-9305</link>
		<dc:creator>Thanks! &#124; omarrr</dc:creator>
		<pubDate>Sun, 28 Nov 2010 08:01:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=195#comment-9305</guid>
		<description>[...] Url: http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette [...]</description>
		<content:encoded><![CDATA[<p>[...] Url: <a href="http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette"  rel="nofollow">http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JH</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/comment-page-5#comment-9273</link>
		<dc:creator>JH</dc:creator>
		<pubDate>Wed, 24 Nov 2010 09:58:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=195#comment-9273</guid>
		<description>Hi, i downloaded the demo, but flash puts out an unexpected file format error when i start the Colour Palette Demo.fla.
I use flash professional 8
Please some help, so i can view your demo.</description>
		<content:encoded><![CDATA[<p>Hi, i downloaded the demo, but flash puts out an unexpected file format error when i start the Colour Palette Demo.fla.<br />
I use flash professional 8<br />
Please some help, so i can view your demo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soulwire</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/comment-page-4#comment-9094</link>
		<dc:creator>Soulwire</dc:creator>
		<pubDate>Thu, 12 Aug 2010 22:09:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=195#comment-9094</guid>
		<description>It sounds like you might want to look at the &lt;a href=&quot;http://www.google.co.uk/search?q=as3+bitmapdata+threshold&quot; rel=&quot;nofollow&quot;&gt;BitmapData.threshold&lt;/a&gt; method.</description>
		<content:encoded><![CDATA[<p>It sounds like you might want to look at the <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://www.google.co.uk/search?q=as3+bitmapdata+threshold"  rel="nofollow">BitmapData.threshold</a> method.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

