I have imagedata in base64 format returned from Expo ImagePicker component, and I want to convert it to An Uint8ClampedArray of RGBA pixel values in the form [r0, g0, b0, a0, r1, g1, b1, a1, ...], cause it's the only input accepted by jsQR library
I tried this, but did not work:
const dataURItoBlob = byteString => {
// write the bytes of the string to a typed array
var ia = new Uint8ClampedArray(byteString.length);
for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i);
}
return ia;
};
any help will be highly appreciated