<?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 Average Colours</title>
	<atom:link href="http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata</link>
	<description>Art + Technology</description>
	<lastBuildDate>Fri, 30 Jul 2010 15:41:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Making the most of your toy robot (Part 3 of 4) – Object Detection &#124; Electric Pineapple</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata/comment-page-3#comment-8878</link>
		<dc:creator>Making the most of your toy robot (Part 3 of 4) – Object Detection &#124; Electric Pineapple</dc:creator>
		<pubDate>Thu, 18 Mar 2010 18:47:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=165#comment-8878</guid>
		<description>[...] spot is a colored ring that can be averaged out and determined to be in a specific range. Using the technique outlined here by Justin Windle we have averaged out the ring color and can ask if the RGB values are in the range [...]</description>
		<content:encoded><![CDATA[<p>[...] spot is a colored ring that can be averaged out and determined to be in a specific range. Using the technique outlined here by Justin Windle we have averaged out the ring color and can ask if the RGB values are in the range [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata/comment-page-2#comment-680</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 23 Nov 2009 19:58:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=165#comment-680</guid>
		<description>THANK YOU!!!  Found your site via Google.  Saved me a ton of headaches with my code on a project at work.  Was only getting the &quot;R&quot; or &quot;B&quot; of an image (not the whole image with all three colors combined).  Thank you thank you thank you!!!</description>
		<content:encoded><![CDATA[<p>THANK YOU!!!  Found your site via Google.  Saved me a ton of headaches with my code on a project at work.  Was only getting the &#8220;R&#8221; or &#8220;B&#8221; of an image (not the whole image with all three colors combined).  Thank you thank you thank you!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Collage Creator &#124; Flash Monkey</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata/comment-page-2#comment-679</link>
		<dc:creator>Collage Creator &#124; Flash Monkey</dc:creator>
		<pubDate>Sun, 22 Nov 2009 21:49:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=165#comment-679</guid>
		<description>[...] I actually did a quick Google search for this one before I started writing it myself and found Justin Windle&#8217;s post which goes into detail about how this works. Once I had the color values I just compare them to [...]</description>
		<content:encoded><![CDATA[<p>[...] I actually did a quick Google search for this one before I started writing it myself and found Justin Windle&#8217;s post which goes into detail about how this works. Once I had the color values I just compare them to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Median Cut &#171; GrgrDvrt</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata/comment-page-2#comment-678</link>
		<dc:creator>Median Cut &#171; GrgrDvrt</dc:creator>
		<pubDate>Wed, 18 Nov 2009 16:45:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=165#comment-678</guid>
		<description>[...] couleurs d&#8217;une belle image, tu peux tout de suite aller chez soulwire voir ces articles: couleurs moyennes et extraire une palette de couleurs, c&#8217;est plus simple et ça marche mieux. Par contre tu vas [...]</description>
		<content:encoded><![CDATA[<p>[...] couleurs d&#8217;une belle image, tu peux tout de suite aller chez soulwire voir ces articles: couleurs moyennes et extraire une palette de couleurs, c&#8217;est plus simple et ça marche mieux. Par contre tu vas [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Case Study : ActionScript 3 Performance Optimization at Mike Chambers</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata/comment-page-2#comment-677</link>
		<dc:creator>Case Study : ActionScript 3 Performance Optimization at Mike Chambers</dc:creator>
		<pubDate>Tue, 13 Oct 2009 17:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=165#comment-677</guid>
		<description>[...] an image, created by averaging the colors within that image. Upon searching on google, I found a very good solution over at soulwire.co.uk, which I will use as the base for creating the palette. I want to point out that the original code [...]</description>
		<content:encoded><![CDATA[<p>[...] an image, created by averaging the colors within that image. Upon searching on google, I found a very good solution over at soulwire.co.uk, which I will use as the base for creating the palette. I want to point out that the original code [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Who wins the award for most popular pixel? &#124; BLOG.RUEDAMINUTE&#62;COM</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata/comment-page-2#comment-676</link>
		<dc:creator>Who wins the award for most popular pixel? &#124; BLOG.RUEDAMINUTE&#62;COM</dc:creator>
		<pubDate>Fri, 02 Oct 2009 02:42:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=165#comment-676</guid>
		<description>[...] Soulwire, a snippet that gets the average color in an [...]</description>
		<content:encoded><![CDATA[<p>[...] Soulwire, a snippet that gets the average color in an [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elliot Geno</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata/comment-page-2#comment-675</link>
		<dc:creator>Elliot Geno</dc:creator>
		<pubDate>Wed, 15 Jul 2009 18:44:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=165#comment-675</guid>
		<description>There&#039;s a much easier way to find the average color of an area of pixels. It can streamline you code immensely, be more accurate, and be easy on your processor. First take your bitmapData for the bitmap you are sampling. Scale it down using a matrix... then blow it back up using a different matrix! The following essentially pixelates the image and blows it back up to fill the bitmap. Simply supply the function with a bitmap, the desired pixel width, and the desired pixel height. You can then sample each of those sections much easier.

&lt;code&gt;&lt;pre lang=&quot;actionscript&quot;&gt; [ function pixelate(bitmap:Bitmap,pixelWidth:Number,pixelHeight:Number):BitmapData {
	var pixelScaleX:Number=1/pixelWidth;//find scale
	var pixelScaleY:Number=1/pixelHeight;
	// shrink bitmap
	var smallBitmapData:BitmapData=new BitmapData(pixelScaleX*bitmap.width,pixelScaleY*bitmap.height,true,0x00000000);//create small bitmap
	var smallMatrix:Matrix=new Matrix();
	smallMatrix.scale(pixelScaleX,pixelScaleY);//physically scales the bitmap
	smallBitmapData.draw(bitmap,smallMatrix,new ColorTransform(),&quot;normal&quot;,new Rectangle(0,0,bitmap.width,bitmap.height),false);// get original bitmap at smaller size using the smallMatrix
	// enlarge bitmap
	var newBitmapData:BitmapData=new BitmapData(bitmap.width,bitmap.height,true,0x00000000);//create normal sized bitmap
	var newMatrix:Matrix=new Matrix();
	newMatrix.scale(bitmap.width/smallBitmapData.width,bitmap.height/smallBitmapData.height);
	newBitmapData.draw(smallBitmapData,newMatrix,new ColorTransform(),&quot;normal&quot;,new Rectangle(0,0,bitmap.width,bitmap.height),false);
	// return the new bitmap
	return newBitmapData;
} ] &lt;/pre&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>There&#8217;s a much easier way to find the average color of an area of pixels. It can streamline you code immensely, be more accurate, and be easy on your processor. First take your bitmapData for the bitmap you are sampling. Scale it down using a matrix&#8230; then blow it back up using a different matrix! The following essentially pixelates the image and blows it back up to fill the bitmap. Simply supply the function with a bitmap, the desired pixel width, and the desired pixel height. You can then sample each of those sections much easier.</p>
<p><code>
<pre lang="actionscript"> [ function pixelate(bitmap:Bitmap,pixelWidth:Number,pixelHeight:Number):BitmapData {
	var pixelScaleX:Number=1/pixelWidth;//find scale
	var pixelScaleY:Number=1/pixelHeight;
	// shrink bitmap
	var smallBitmapData:BitmapData=new BitmapData(pixelScaleX*bitmap.width,pixelScaleY*bitmap.height,true,0x00000000);//create small bitmap
	var smallMatrix:Matrix=new Matrix();
	smallMatrix.scale(pixelScaleX,pixelScaleY);//physically scales the bitmap
	smallBitmapData.draw(bitmap,smallMatrix,new ColorTransform(),"normal",new Rectangle(0,0,bitmap.width,bitmap.height),false);// get original bitmap at smaller size using the smallMatrix
	// enlarge bitmap
	var newBitmapData:BitmapData=new BitmapData(bitmap.width,bitmap.height,true,0x00000000);//create normal sized bitmap
	var newMatrix:Matrix=new Matrix();
	newMatrix.scale(bitmap.width/smallBitmapData.width,bitmap.height/smallBitmapData.height);
	newBitmapData.draw(smallBitmapData,newMatrix,new ColorTransform(),"normal",new Rectangle(0,0,bitmap.width,bitmap.height),false);
	// return the new bitmap
	return newBitmapData;
} ] </pre>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soulwire</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata/comment-page-2#comment-674</link>
		<dc:creator>Soulwire</dc:creator>
		<pubDate>Mon, 15 Jun 2009 17:33:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=165#comment-674</guid>
		<description>Hi Luis,

Oops, my bad - this data copied to the clipboard wasn&#039;t being updated when you select a new amount for the colours.

The demo is updated now and will give you your desired amount of colours. Clear your cache and you&#039;re good to go!</description>
		<content:encoded><![CDATA[<p>Hi Luis,</p>
<p>Oops, my bad &#8211; this data copied to the clipboard wasn&#8217;t being updated when you select a new amount for the colours.</p>
<p>The demo is updated now and will give you your desired amount of colours. Clear your cache and you&#8217;re good to go!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata/comment-page-2#comment-673</link>
		<dc:creator>Luis</dc:creator>
		<pubDate>Mon, 15 Jun 2009 17:11:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=165#comment-673</guid>
		<description>Do you have a full working version? The demo only copies 16 colors to clipboard and I need at least 64 colors... Thanks</description>
		<content:encoded><![CDATA[<p>Do you have a full working version? The demo only copies 16 colors to clipboard and I need at least 64 colors&#8230; Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sekati</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/extract-average-colours-from-bitmapdata/comment-page-2#comment-672</link>
		<dc:creator>sekati</dc:creator>
		<pubDate>Thu, 04 Jun 2009 17:17:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=165#comment-672</guid>
		<description>You might be interested in the ColorUtil I wrote as part of my framework (used in a large colorful cosmetics application as well); it offers averaging for any display object (or portion of a display object) in R, G, B, saturation, contrast, lightness and value which can really come in handy.

src: http://code.google.com/p/sekati/source/browse/trunk/src/sekati/utils/ColorUtil.as

doc: http://docs.sekati.com/sekati/sekati/utils/ColorUtil.html</description>
		<content:encoded><![CDATA[<p>You might be interested in the ColorUtil I wrote as part of my framework (used in a large colorful cosmetics application as well); it offers averaging for any display object (or portion of a display object) in R, G, B, saturation, contrast, lightness and value which can really come in handy.</p>
<p>src: <a rel="nofollow" href="http://blog.soulwire.co.uk/goto/http://code.google.com/p/sekati/source/browse/trunk/src/sekati/utils/ColorUtil.as"  rel="nofollow">http://code.google.com/p/sekati/source/browse/trunk/src/sekati/utils/ColorUtil.as</a></p>
<p>doc: <a rel="nofollow" href="http://blog.soulwire.co.uk/goto/http://docs.sekati.com/sekati/sekati/utils/ColorUtil.html"  rel="nofollow">http://docs.sekati.com/sekati/sekati/utils/ColorUtil.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
