Open carlo318 opened 7 years ago
I'm also getting the same error. Any update?
I was passing the wrong option to the Camera Plugin.
It should be cameraOptions.DestinationType.DATA_URL
@carlo318 in your case, pass the _testImage
without prefixing it with data:image/jpep:base64,
and that should be it
I tried your suggestion @NBAMj , but now it does'nt give me any feedback, neither successful, nor failed.
With or without the prefix data:image/jpeg:base64,
How comes?
I also put try catch outside Tesseract and inside any function (successful or failed), but nothing happens. Could it be any issue with Java? The last version is always 0.0.1?
Thankyou.
Any resolution to this? I am getting same issue.
I resolve the problem like this:
var myimage = document.getElementById('smallImage').src.replace('data:image/jpeg;base64,', '');
TesseractPlugin.recognizeText(myimage, 'eng', function(recognizedText) {
console.log(recognizedText);
}, function(reason) {
console.log('Error on recognizing text from image. ' + reason);
});
Hi, I have installed the plugin in an App for Android made with Ionic Framework. I am trying to get an image with cordova-image-camera which is getting a base64 image, which is correct (if I use it in an it show the image correctly). I pass that base64 as imageData input, but Tesseract always get an Exception "Bad Base-64". Do you what could be the reason?
Example code:
The loadLanguage() call works successfully. The recognizeText() always returns the function(reason), with the message: "Bad Base-64";
Thankyou. Carlo