# applyFilter vs filters = \[array\] performance

**URL:** https://forum.kirupa.com/t/applyfilter-vs-filters-array-performance/332128
**Category:** flash
**Created:** [February 9, 2014, 11:22pm UTC](https://forum.kirupa.com/t/applyfilter-vs-filters-array-performance/332128 "2014-02-09T23:22:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NiallTL](https://avatars.discourse-cdn.com/v4/letter/n/d26b3c/32.png) [@NiallTL](https://forum.kirupa.com/u/NiallTL)
#### Post date: [February 9, 2014, 11:22pm UTC](https://forum.kirupa.com/t/applyfilter-vs-filters-array-performance/332128/1 "2014-02-09T23:22:28Z")

</div>

Hello! I’ve been working on a project that uses a bitmapdata with a few filters applied to it. As my BitmapData is cleared at each step of an enterFrame event, I need to re-apply each individual filter to it using applyFilter. I was just wondering, is it less of a performance bottleneck to apply each filter only once to its containing Bitmap at the initialization, using bitmap.filters = []? I wasn’t sure if it made a difference, but I’m apprehensive about using the second method as I’d need to be drawing it to yet another Bitmap.

Also, side question - is there an elegant way to make all black pixels in a bitmapdata transparent without using Pixel Bender or iterating through every single pixel? Can’t get either threshold nor colormatrixfilter to work…
