I'm working with croppie js and the lib returns a blob object.
But for my website I have two options, use the blob for the Microsoft's OCR (which works perfectly) to have the text in the part of the image or have the part itself and so I need to open the blob to get the URL to put it in the src's field of an image element
I found this on https://developer.mozilla.org/fr/docs/Web/API/Blob
function write_img(blob)
{
var reader = new FileReader();
reader.addEventListener("loadend", function() {
// reader.result contient le contenu du
// blob sous la forme d'un tableau typé
});
reader.readAsDataURL(blob);
document.getElementById("result").innerHTML += "<img src=\"" + reader.result + "\" >";
}
But it returns null, Is anyone able to help?