You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my res is the result of base64 image with this:
function convertDataURIToBinary(dataURI) {
var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
var base64 = dataURI.substring(base64Index);
var raw = window.atob(base64);
var rawLength = raw.length;
var array = new Uint8Array(new ArrayBuffer(rawLength));
this is my code:
javascriptBarcodeReader({
/* Image file Path || {data: Uint8ClampedArray, width, height} || HTML5 Canvas ImageData */
image: {data: Uint8ClampedArray.from(res),width: 3333, height: 313},
barcode: 'code-128',
// barcodeType: 'industrial',
})
.then(code => {
console.log('code is',code)
})
.catch(err => {
console.log(err)
})
its print my nothing
my res is the result of base64 image with this:
function convertDataURIToBinary(dataURI) {
var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
var base64 = dataURI.substring(base64Index);
var raw = window.atob(base64);
var rawLength = raw.length;
var array = new Uint8Array(new ArrayBuffer(rawLength));
for(i = 0; i < rawLength; i++) {
array[i] = raw.charCodeAt(i);
}
return array;
}
The text was updated successfully, but these errors were encountered: