Whatever works best, right? ;)
yes absolutly!

Fabrice
On Oct 21, 2008, at 5:40 PM, Henry Cooke wrote:


2008/10/21 Fabrice <[EMAIL PROTECTED]>:

this will not work cleanly.
if the image contains blue, it will alter the image creating the noise you
describe.

True. It sounded like Ben already had a bunch of JPG files he didn't
want to alter, so I was trying to think of the quickest possible way
for him to achieve blue == transparent in Actionscript.

You're right about it not working cleanly, but, depending on the
quality of the JPG, he might be able to get away with it. Failing
that, a method like you describe for copying into an intermediate
black&white bitmap could work, with thresholding:

Step 1: copy original into a temp bitmap
step 2: use bmd.threshold to set anything < threshold blue to #00000
step 3: use bmd.threshold to set anything > threshold blue to #FFFFFF
step 4: copyChannel original jpeg alpha to temp bitmap R/G/B
step 5: copyChannel temp bitmap R/G/B to original bmd alpha

With a generous enough threshold it might just work?

I'm just spouting stuff off the top of my head though, it would
probably need a bit of tweaking (and maybe some blurring etc) to get
right.

Whatever works best, right? ;)

h.

Reply via email to