lementById("file").files[0];

	let arrayBuffer = await file.arrayBuffer();
	let u8Buffer = new Uint8Array(arrayBuffer);

	let zxingBuffer = zxing._malloc(u8Buffer.length);
	zxing.HEAPU8.set(u8Buffer, zxingBuffer);
	let results = zxing.readBarcodesFromImage(zxingBuffer, u8Buffer.length, true, format, 0xff);
	zxing._free(zxingBuffer);

	showResults(results);
	showImageWithResults(file, results);
}

function showImageWithResults(file, results) {
	var canvas = document.getElementById("canvas");
	var img = new I