Exporting a bitmap at runtime?

I’m wondering if it is possible to export a “screenshot” of the stage to an image file that the user can download. for instance, they draw a picture, click a download button, and get a prompt to download the image they’ve drawn as a jpeg or what have you. I’ve found some sparse info about using PHP to send a bitmapdata object to the server (I think), but I need a little more help. I’m working with AS3 and CS3.

Thanks!