I have a BitmapImage and I applied a ShaderFilter to it:
var bm:BitmapImage = new BitmapImage();
bm.source = resizedBitmapData;
bm.filters = [filter];
I tried copy the bitmapImage into a bigger image as overlay:
bm.addEventListener(FlexEvent.READY, function (event:*):void {
var bmd:BitmapData = bm.bitmapData;
backgroundBitmap.bitmapData.copyPixels(bmd,
new Rectangle(0, 0, bmd.width, bmd.height),
location);
});
It worked but what “bmd” contains is the original image before the filter was applied. What I wanted is to grab the resulting image after applying the filter. Is this possible?
I was trying ImageSnapshot.captureBitmapData() but BitmapImage doesnt seem to be an IBitmapDrawable.
I would try adding it to a sprite and then render the sprite if your way is not working allready…
something like
have you anyway checked the filter applies and is rendering with the wanted result? 😉