Hai all once again i'm back,     
     How can i save the  image captured in flex in server side Using Java
JAI. I had tried many solutions but i failed to achieve that. I can able to
send the JpegEncoded byte array as string (Using Base64Decode) to the server
side from MXML page. But in server side i can't able to convert the encoded
string to image format using Java JAI and save it. Can anyone please post me
the java code to save the captured image. When i save the String as jpeg
image in server side the file gets saved but no image is visible.

The following is the mxml code snippet.

var jpgenc:JPEGEncoder = new JPEGEncoder();
var bmd:BitmapData = new BitmapData(mm1.width,mm1.height);
bmd.draw(mm1);
var ohSnap:ImageSnapshot = ImageSnapshot.captureImage(bmd,0,jpgenc);            
   
var byteArr:String;
base64Enc = new Base64Encoder();
base64Enc.encode(ImageSnapshot.encodeImageAsBase64(ohSnap));
byteArr = base64Enc.flush();

var request:URLRequest = new URLRequest ();
request.url = "http://serverpath/sqftcalc/save.do";;
request.method = URLRequestMethod.POST;
request.data = new URLVariables ("BYTEDATA=" + byteArr);
downloadFileRef.download (request, "file")

Thanks in advance
Jai
-- 
View this message in context: 
http://www.nabble.com/How-to-save-the-Captured-Screen-Shot-Image-in-Flex-Using-java-JAI-tp18481780p18481780.html
Sent from the FlexCoders mailing list archive at Nabble.com.

Reply via email to