0

应用一些 Pixel Bender 滤镜后,如何将影片剪辑拉伸到其宽度和高度的两倍?

我有一些带有视频的对象(例如 512 x 512),我在其上应用了 Pixel Bender 过滤器。现在我想拉伸结果(例如 1024 x 1024)。怎么拉伸?

所以我的观点是 1)渲染效果的结果 2)拉伸结果

(这都是为了节省 CPU/GPU 资源,所以如果这样的操作不能帮助我节省,请通知我)

4

2 回答 2

1

您可以从中创建一个新的位图并对其进行缩放:

//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);

你可能想要调整一些东西,比如平滑或像素捕捉

于 2009-11-12T08:23:11.013 回答
0

我还没有尝试过使用 PixelBender 剪辑,但clip.width *= 2; clip.height *= 2;在这种情况下不能正常工作?

于 2009-11-12T02:32:05.810 回答