You can also use the subtract blendmode.  BitmapData.draw supports using a
blendmode, and subtract does exactly what you want.

--Brian

On 8/21/07, Bojil Vassilev <[EMAIL PROTECTED]> wrote:
>
> Thank you both for the replies. There is some urgent stuff at work right
> now, but I'll test more later and report what I found out.
> Cheers.
>
> Danny Kodicek написа:
> >
> >
> >> I have BitmapData A and BitmapData B;
> >> Is there a fast routine that from every pixel in A will
> >> subtract the color of the coresponding pixel in B?
> >> I'm looking for a solution using the built-in BitmapData
> >> functions, since a manual looop on every pixel will be
> >> somewhat intensive (even if I use the getPixels>loop
> >> ByteArray>setPixels hack to set the pixels, instead of a
> >> setPixel() loop);
> >>
> >
> > Interestingly, in Director this is easy using copyPixels and the
> #subtract
> > ink, so as the BitmapData object is essentially an updating of
> Director's
> > Image object, I'd have expected the same routine to be available in
> Flash.
> > Is there some undocumented parameter of the copyPixels function?
> >
> > Danny
> >
> > _______________________________________________
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> >
>
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to