views:

80

answers:

1

Whats the difference between these two? They seem to both do the same thing not to mention both applied to the bitmap through applyFilter().

+3  A: 

The color matrix filter is, as the name and usage implies, an image filter effect available in Flash (documentation available here).

Pixel Bender is the generalised language and tools provided to allow you to create your own custom image filters. More pixel bender info here: http://www.adobe.com/devnet/pixelbender/

So, at the simplest level, the colour matrix is a built-in filter and pixel bender allows you to create your own filters.

Sly_cardinal
worth mentioning pixelbender runs in its own thread. Can be faster or so I am lead to believe.
Allan
@Allan: PixelBender is not faster. If it were, Adobe would be clever enough to implement `ColorMatrixFilter` using PixelBender. Generally, a `BitmapFilter` outperforms PixelBender, which in turn outperforms ActionScript. It's role is to fill the gap between the fast, but limited filters, and the slow, but basically unlimited possibilities of the AVM2.
back2dos
related to the speed of the two approaches: http://stackoverflow.com/questions/2853257/using-pixelbender-to-double-the-size-of-a-bitmap
jedierikb
@back2dos @jedierikb Thanks for clearing me up on that :)
Allan