How to stretch out the movie clip after applying some Pixel Bender filter? (Flash)

683 views Asked by At

How to stretch out the movie clip to twice its width and height after applying some Pixel Bender filter?

I have some object with video on it (for ex 512 by 512) I apply a Pixel Bender Filter on it. Now I want to stretch the result (for ex to 1024 by 1024). How to stretch it?

So my point is 1) Render the result of effect 2) Stretch out the result

(It’s all fore CPU/GPU resources saving so if such operation would not help me to save than please inform me)

2

There are 2 answers

0
Les On BEST ANSWER

You can create a new Bitmap from it and scale that:

//mv is your movieclip with the filter applied, mine had shadow so i added 20 pixels in size
var bitmapData:BitmapData = new BitmapData(mv.width + 20, mv.height + 20, true, 0x00000000);
bitmapData.draw(mv);

new_mv = new Bitmap(bitmapData);
new_mv.width *= 2;
new_mv.height *= 2;


addChild(new_mv);

You might want to tweak some stuff like smoothing or pixelsnapping

2
Cory Petosky On

I haven't tried it with PixelBender-ed clips, but does clip.width *= 2; clip.height *= 2; not work as usual in this case?