Flash 8 : BitmapData.threshold

One of the things that really struck me about the Flash 8 BitmapData object and the Filters, was the sheer speed at which they operate. I’m so used to vector based operations in Flash, that these new methods just seem blindingly fast. Today on BIT-101, I posted an example that uses an embedded video, draws it frame-by-frame into two Bitmap data objects, converts one to grayscale, blurs it, and applies a threshold operation on it, dynamically cutting out all pixels below a certain value, copying over the full color data for the other pixels. Flash handles this all quite happily at 31 fps. In fact, on my low-end Toshiba laptop, it only pushes the CPU to 23%. Unbelievable!

This entry was posted in Flash. Bookmark the permalink.

4 Responses to Flash 8 : BitmapData.threshold

  1. Ash says:

    Thats really cool. I’ve never seen that kind of video filter before.. I do think you should have recorded yourself running against a white background though, and then layered the results over a scrolling scooby-doo background 🙂

  2. Keith Peters says:

    haha! The funny thing is that this isn’t even really a “video feature”. I’m just drawing the video into a BitmapData object and applying the threshold to that. Combine that with some of the cool things you can do with Flash 8 video, and … wow.

  3. TC says:

    The examples are not working for me… I have Player 7.0.24 installed, but I just get the main video playing and the slider – nothing on the left to see… same on my PC at another location… any thoughts?

    love the site – I check it daily!

  4. Keith Peters says:

    “I have Player 7.0.24 installed”

    That would explain it. These are Flash 8 samples.

    http://www.macromedia.com/software/flashplayer/public_beta/

Comments are closed.