# Webcam, bitmapData and Matrix problem

**URL:** https://forum.kirupa.com/t/webcam-bitmapdata-and-matrix-problem/238183
**Category:** Uncategorized
**Created:** [September 7, 2007, 10:27pm UTC](https://forum.kirupa.com/t/webcam-bitmapdata-and-matrix-problem/238183 "2007-09-07T22:27:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gmr](https://avatars.discourse-cdn.com/v4/letter/g/49beb7/32.png) [@gmr](https://forum.kirupa.com/u/gmr)
#### Post date: [September 7, 2007, 10:27pm UTC](https://forum.kirupa.com/t/webcam-bitmapdata-and-matrix-problem/238183/1 "2007-09-07T22:27:58Z")

</div>

Hi,  
I’m new here and have encountered an annoyance when working with bitmapData and Matrix:

```auto
cam = Camera.get();
vid.attachVideo(cam);
var videoW = vid._width; //1024
var videoH = vid._height; //768
var pxSize = 256;
grid = new BitmapData(videoW/pxSize, videoH/pxSize, false, 0x006600FF);
gridSrc.attachBitmap(grid, 2);
scaleMatrix.scale(1/pxSize,1/pxSize);
grid.draw(vid,scaleMatrix);

```

gives only the color #6600FF,while you should see a four by three (1024/256…) pixelgrid…

Any ideas how I could resolve this issue?

Thx in advance,  
gmr
