# Transform Matrix and BitmapData

**URL:** https://forum.kirupa.com/t/transform-matrix-and-bitmapdata/189230
**Category:** flash
**Created:** [May 15, 2006, 8:02am UTC](https://forum.kirupa.com/t/transform-matrix-and-bitmapdata/189230 "2006-05-15T08:02:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![leraptor](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/leraptor/32/2353_2.png) [@leraptor](https://forum.kirupa.com/u/leraptor)
#### Post date: [May 15, 2006, 8:02am UTC](https://forum.kirupa.com/t/transform-matrix-and-bitmapdata/189230/1 "2006-05-15T08:02:01Z")

</div>

I’m trying to take a snapshot from a picture and this snapshot will depends of a movie clip that represents a digital camera display.

I use the Draw method with a matrix to apply the modifications to the final image.

But I don’t seem to be able to find the exact values I should put, because the movie clip is a movable one, and translation will change depending on it’s \_x and \_y coordinates.

Any help ?

[AS]  
snapshot = new BitmapData(follow.\_width, follow.\_height); // Creating a new BitmapData with the digital camera display height and width  
var m:Matrix = photo1\_mc.transform.matrix; // Taking the transform matrix from the photo that I wish to manipulate

```
	m.tx =- follow._x+x1; // I don't know the exact value to put here. What amount of translation ?
	m.ty = -follow._y+x2;
	

snapshot.draw(photo1_mc, m); // Drawing the image using the m matrix
capture_mc.attachBitmap(snapshot, 1);

```

[/AS]  
I could find some values by trial and error but this sounds too desperate to me.
