BIT-101 [2003-2017]

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!

« Previous Post
Next Post »