# Can i save masked objects in a bitmap?

**URL:** https://forum.kirupa.com/t/can-i-save-masked-objects-in-a-bitmap/264460
**Category:** Uncategorized
**Created:** [June 26, 2008, 10:17am UTC](https://forum.kirupa.com/t/can-i-save-masked-objects-in-a-bitmap/264460 "2008-06-26T10:17:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![antigirl](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@antigirl](https://forum.kirupa.com/u/antigirl)
#### Post date: [June 26, 2008, 10:17am UTC](https://forum.kirupa.com/t/can-i-save-masked-objects-in-a-bitmap/264460/1 "2008-06-26T10:17:42Z")

</div>

then save them as jpg/png?

trying to do a virtual character where people can upload their own pictures/

> var URLReq:URLRequest = new URLRequest(“siteb.jpg”);  
> var imageLoader:Loader = new Loader();  
> imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadBit);  
> imageLoader.load(URLReq);

function loadBit(event:Event):void {

```
myBitmap = Bitmap(imageLoader.content);   
addChild(myBitmap); 

 var b:BitmapData=new BitmapData(maskermc.height, maskermc.width,true,0x00FFFFFF);

```

var mc:MovieClip = new MovieClip();  
mc.addChild(myBitmap.mask=maskermc);

b.draw(mc);

basically im trying to put masked IMAGE into a movie clip then putting that into a bitmap  
ive tried converting image and mask into bitmaps then masking and successfully saved that into a bitmap BUT its a rectangle!!!

is it possible to save masked images into movieclips/bitmaps

---

<div class="post-metadata">

### Author: ![devonair](https://avatars.discourse-cdn.com/v4/letter/d/3be4f8/32.png) [@devonair](https://forum.kirupa.com/u/devonair)
#### Post date: [June 26, 2008, 1:48pm UTC](https://forum.kirupa.com/t/can-i-save-masked-objects-in-a-bitmap/264460/2 "2008-06-26T13:48:15Z")

</div>

Just remove the mask for the time it takes to draw the image into a bitmap. Unless it’s an excessively large or data rich image, the action will be transparent to the user. Something like:

[AS]var b:BitmapData = new BitmapData(maskermc.height, maskermc.width,true,0x00FFFFFF);  
maskermc.mask = null;  
b.draw(maskermc);  
maskermc.mask = imageMask\_mc;  
// go on to create Bitmap/Movieclip instance[/AS]
