I have two BitmapData objects with alpha channels. I'd like to combine them into a single one by using max(channel_image_one, channel_image_two) for each channel, including the alpha. Is there an easy way to achieve this result?
I don't think there's straight forward bitmapdata method to merge the Alpha chanel that way. RGB could maybe do with the help of draw() applying a blend mode, but I don't think it would work if you need a strict max per chanel).
Besides, you can create a shader thanks to PixelBender to perform this task. It's the perfect tool for that kind of manipulations.
Slower in performance but quicker to setup if your not used to PB you could just iterate/compare/write the pixels one by one with BitmapData.getPixel32()/setPixel32(). In case you go for that, think about using BitmapData.lock()/unlock() to boost performance.