# Please check this affirmation about copyPixels

**URL:** https://forum.kirupa.com/t/please-check-this-affirmation-about-copypixels/230052
**Category:** flash
**Created:** [June 22, 2007, 8:00am UTC](https://forum.kirupa.com/t/please-check-this-affirmation-about-copypixels/230052 "2007-06-22T08:00:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![costa](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@costa](https://forum.kirupa.com/u/costa)
#### Post date: [June 22, 2007, 8:00am UTC](https://forum.kirupa.com/t/please-check-this-affirmation-about-copypixels/230052/1 "2007-06-22T08:00:30Z")

</div>

Dear all,

Please tell me if this affirmation is correct:

I have this code

```auto
var myMC:mcSet = new mcSet(832,576); // an image in the library
var titleBitmap:Bitmap = new Bitmap(myMC);

var _map:BitmapData = new BitmapData(1920,1440,false, 0xffffffff);// image holder

var _bitmap:BitmapData = new BitmapData(512,416,false, 0xffffffff); //part of _map I want to render
var image:Bitmap = new Bitmap(_bitmap);
image.x =xOffset;
image.y = yOffset;
this.addChild(image);

```

Now I populate \_map

```auto
function fillMap (){
&#8230;.
rect = new Rectangle(posX,posY,widthRect,heightRect);
position = new Point (newPosX,newPosY);
_map.copyPixels(titleBitmap.bitmapData,rect,position);
&#8230;.
}

```

And now I populate \_bitmap:

```auto
function fillBtimap (){
&#8230;
rect = new Rectangle(posX,posY,widthRect,heightRect);
positiont = new Point (newPosX,newPosY);
	_bitmap.copyPixels(_map,rect,position);
&#8230;
}

```

Ok, this is my assumption:

Because \_map has already my image in memory, when I populate \_bitmap using \_map, I am not adding extra data to memory; I am just making reference to memory. Is this correct?

I will appreciate your feedback
