I have the following situation: I have n bitmapdata objects of the same width 
and height. Each bitmapdata object have some black pixels (0x000000) and the 
rest of the pixels are of different colors.

The position of the black pixels is different in each bitmapdata object. 

I want to be able to create a new bitmapdata object that contains the union of 
the black pixels of the other objects and ignore the other colors.

I know I can loop through the bitmapdata objects and check with pixels are 
black and create the resulting one. However, I need to repeat that process many 
times with tons of images that could be as large as 1000 by 100 pixels. hence, 
I would like to know if there is a way to create that resulting bitmapdata 
object, without the need to loop. 

For instance, the compare method allows to compare 2 bitmapdata objects to see 
which ones has the same colors in the same positions as:

var diff::BitmapData = bd1.compare.bd2

diff will have a value of 0x000000 for the pixels that are of the same color in 
bd1 and bd2. 

In may case I want to do something like that but to create a bitmapdata object 
with all black pixels.

Any suggestions?



Reply via email to