[flexcoders] Re: Capturing and Saving an image in Flex (BitmapData)

2010-03-05 Thread Michael
In order to save the image file to disk, you need to use the AIR File API, which is available only to AIR applications. You can capture the image, encode it as PNG or JPEG using mx.graphics.codec.JPEGEncoder or mx.graphics.codec.PNGEncoder, then upload the resulting byte to a server. Then

Re: [flexcoders] Re: Capturing and Saving an image in Flex (BitmapData)

2010-03-05 Thread Wally Kolcz
I have this so far. Where I have the ?? is where I would like to know a way to either transfer the newly created image to a folder on the server...or I am at the point I could just let them download it/save it and then reupload it (dont prefer that). public function saveImage():void {

Re: [flexcoders] Re: Capturing and Saving an image in Flex (BitmapData)

2010-03-05 Thread Tim Statler
You could then create a URLRequest object, which specifies the POST URL and the byte array of image data you want to send. (See http://livedocs.adobe.com/flex/3/langref/flash/net/URLRequest.html#data).Youcan then pass the URLRequest object to a URLLoader to do the actual sending/loading etc. Tim

Re: [flexcoders] Re: Capturing and Saving an image in Flex (BitmapData)

2010-03-05 Thread Brian Thompson
You'll need some server-side code to accept the image upload and save it to disk. It's pretty simple in PHP. On the Flex side, you'll just need to use something like URLLoader or HTTPService to POST the image to your upload form on the server. -Brian On Fri, Mar 5, 2010 at 10:50 AM, Wally