I'd like to add a button so the user can snapshot a graph in my flex app. I can do this storing it on the server with Java, but I'd like for the user to have direct access to it. Since I don't think this can be done for instance saving to the desktop, I thought the next best solution would be to send the image to say a new browser window, possibly via a servlet? But I'm not sure how to do this or if this is the best solution. Any ideas or examples of how this should be done? Here is a little snippet of the method I use to encode the image into a byteArray:
private function saveImage(e:ImageUpdateEvent):void { var comp:UIComponent = e.comp; var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(comp); var imageByteArray:ByteArray = imageSnap.data as ByteArray; imgSave.saveImage(imageByteArray, e.name+"-img.png"); }