We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6605551 commit 1743571Copy full SHA for 1743571
1 file changed
samples/louie-drivers-license/index.html
@@ -89,7 +89,16 @@ <h1 class="home-page-title">Read a Driver's License</h1>
89
90
const result = await scanner.launch();
91
console.log(result);
92
- downloadImageFromBytes(result.originalImageResult.toBlob("image/png"), "photo.png", "image/png");
+ result.originalImageResult.toCanvas().then(canvas => {
93
+ // Optional: style or size the canvas
94
+ canvas.style.maxWidth = "100%";
95
+ canvas.style.display = "block";
96
+ canvas.style.margin = "16px auto";
97
+
98
+ // Decide *where* it should live
99
+ const container = document.querySelector(".parsed-result-view");
100
+ container.prepend(canvas); // or appendChild
101
+ });
102
103
if (result.barcodeResults.length > 0) {
104
let processedResult;
0 commit comments