I am taking a picture and i am converting it into Base64 string. And i am able to calculate the size of the picture in KB. I need to know the formula to calculate the size in MB. Please clarify.
The below code works fine for calculating size in KB.
function onCameraClick() {
var base64Val = kony.convertToBase64(frmImageSize.camCamera.rawBytes);
var imageSizeinKB = base64Val.length*0.75 )/1024;
}