# Resize a bitmap?

**URL:** <https://forum.kirupa.com/t/resize-a-bitmap/232477>\
**Category:** flash\
**Created:** [July 14, 2007, 7:30am UTC](https://forum.kirupa.com/t/resize-a-bitmap/232477 "2007-07-14T07:30:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesabruce](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@jamesabruce](https://forum.kirupa.com/u/jamesabruce)\
**Post date:** [July 14, 2007, 7:30am UTC](https://forum.kirupa.com/t/resize-a-bitmap/232477/1 "2007-07-14T07:30:34Z")

</div>

Oh man, this is really getting to me. Ive searched long and hard, and nothing is helping me. Or Im searching wrong. Either way… Im trying to make a simple painting app where you can paint on top of your own images. So I load an image from the server, and make it into a bitmap:

(1)  
[INDENT]var image:Bitmap= Bitmap(loader.content);  
[/INDENT]  
Then I paint it onto a canvas using the beginBitmapFill method…

(2)  
[INDENT]paintCanvas.graphics.beginBitmapFill(image.bitmapData);  
paintCanvas.graphics.drawRect(0,0,400,300);  
paintCanvas.graphics.endFill();  
[/INDENT]However, the image loaded from the server is 640x480, and doesnt all fit into my small 400x300. How can I resize it a bitmap, so just before point 2 above???

TIA, jamie
