# Make duplicate display of webcam feed

**URL:** <https://forum.kirupa.com/t/make-duplicate-display-of-webcam-feed/328171>\
**Category:** Uncategorized\
**Created:** [April 24, 2012, 1:56am UTC](https://forum.kirupa.com/t/make-duplicate-display-of-webcam-feed/328171 "2012-04-24T01:56:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freddythunder](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@Freddythunder](https://forum.kirupa.com/u/Freddythunder)\
**Post date:** [April 24, 2012, 1:56am UTC](https://forum.kirupa.com/t/make-duplicate-display-of-webcam-feed/328171/1 "2012-04-24T01:56:57Z")

</div>

This should be easy but I think my package is leaking somewhere. I’m not used to AS3; I’m one of those who voted that 2.0 still does everything that I needed - until now.

So, I’m trying to write some apps that will include some image processing for facial, object recognition. There’s a ton of stuff out there (mostly from 2009) that doesn’t work very well and I want to give it a try.

Anyway, I have the webcam feeding a video object I’ve addChild()ed to the stage and that works aces. I want to make a copy of that video stream and plop it on the stage right next to it. This works, but the framerate suffers:

```auto

public function update(event):void
{
	//onEnterFrame
	var bmp:BitmapData = new BitmapData(_video.width/5,_video.height/5);
	var mat:Matrix = new Matrix();
	var goat:Bitmap = new Bitmap(bmp);
	mat.scale(.2,.2);
	bmp.draw(_video, mat);
	mc:addChild(goat);
	goat.x = 320;
	goat.y = 0;
	goat.width = 320;
	goat.height = 240;

}

```

So this puts a pixelated version of the webcam feed right next to it just like I wanted, but it seems to lug down the processor. Logic would tell me that I’m piling on infinate amounts of “goat” to my movieClip (mc). I try to dispose() the bmp, but then it stops working. Any ideas? Why can’t I find anything like this on the interweb??
