# Bitmap Data

**URL:** <https://forum.kirupa.com/t/bitmap-data/324071>\
**Category:** flash\
**Created:** [July 31, 2011, 11:55pm UTC](https://forum.kirupa.com/t/bitmap-data/324071 "2011-07-31T23:55:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arks](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@arks](https://forum.kirupa.com/u/arks)\
**Post date:** [July 31, 2011, 11:55pm UTC](https://forum.kirupa.com/t/bitmap-data/324071/1 "2011-07-31T23:55:35Z")

</div>

Hi, so I’ve been stuck on this problem for a few days now.  
Basically I have an external image, brought in through XML and loaded up with the Loader class.  
I know it loads because there is another child on the stage.  
\_greenShape is the loader.content (the bitmap image).

This code doesn’t work:

```auto
var _newGreenBmd:BitmapData = _greenShape as BitmapData;
var _newGreen:Bitmap = new Bitmap(_newGreenBmd);
_greenShapeBmd.draw(_newGreen);

```

But when I bring the image into the library and reference to it through linkage, it works just fine:

```auto
var _newGreenBmd:BitmapData = new HeadShapeArea(_greenShape.width,_greenShape.height) as BitmapData;
var _newGreen:Bitmap = new Bitmap(_newGreenBmd);
_greenShapeBmd.draw(_newGreen);

```

Any ideas on what’s happening to the bitmap loaded externally making it act differently to one that’s linked from the library?

Thanks in advance!

-Ahren.
