Hi
I didn't find a better solution than two x and y loops... (other loop
solutions I tested are not faster)
Just note than copyChannel is a method 3x slower than copyPixels
If you need to loop on your BitmapData, may be doing a setPixel inside the
loop to build your channel Bitmap is more faster than doing your loop and
then 3 copyChannel...
The better method I found (the fastest) to get or set r,v,b components when
you extract a color with getPixel is:
to get color:
arvb =
{alpha:color>>24,red:(color>>16)%256,green:(color>>8)%256,blue:color%256};
to set color:
color = (((((alpha<<8)+red)<<8)+green)<<8)+blue;
good luck
David Buff
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, October 22, 2006 4:49 AM
Subject: [Flashcoders] Q:Playing with BitmapData
Hi
There are two things I am trying to do with bitmap data.
The first is to analyze every pixel in an image using getpixel and then
store this info as xml data for later manipulation.
Can anyone offer suggestions to speed up this process?
The second techinique is to simulate splitting up an image into its
corresponding red, green and blue channels, showing how a 'true color'
image is achieved when these three channels perfectly overlap one another.
Do I simply need to use the Copychannel method of the BitmapData object
for this?
Thanks in advance!
Jim Bachalo
[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca
--------------------------------------------
"...all improvisation is life in search of a style."
- Bruce Mau,'LifeStyle'
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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