Im trying to convert an image file to Int8Array. I have something like this:
public onFileChange(event) {
const reader = new FileReader();
reader.onload = () => {
this.productImage = new Int8Array(reader.result);
};
reader.readAsArrayBuffer(event.target.files[0]);
}
Where event is the uploaded image file. So how to put it in:
productImage: Int8Array;
I would use some help, thanks.