Resize a bitmap?

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