06-19-2012 03:28 AM
I tried conveting image to base64 encoding stirng to be sent to the server.. I am able to retrieve the file path succesfully using file picker, but converting image to string is raising concerns. I used base64outputstream n all sort of stuff.. But Sometimes they work, some times they wont... I want to have a code snippet which accomplishes my task... Can some1 help me???
Solved! Go to Solution.
06-19-2012 03:43 AM
try{
if(capturedImageBytes!=null)
inputRaw = net.rim.device.api.io.Base64OutputStream.encodeAsS tring
(capturedImageBytes, 0, capturedImageBytes.length, false, false);
}catch(Throwable th){
System.out.println("th.getMessage() ########## image ### inputRaw -------------- " +th.getMessage());
}
I guess, It sometimes fail due to image size too big..
06-19-2012 05:22 AM
So, Is there a certain size limit for outputstream ?
06-20-2012 02:30 AM
I suggest developers who are encoding the image to resize the image programitically before encoding.. this will accomplish the Encoding task 99 out of 100 times
...