From df45f150f14e5e02ec18e04b53f3ca3357b43d61 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sat, 18 Oct 2025 09:44:51 +0530 Subject: [PATCH] chnaged logic in ocr for capturing image in high quality --- .../views/fields/camera-capture.blade.php | 42 +++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/resources/views/fields/camera-capture.blade.php b/resources/views/fields/camera-capture.blade.php index 6657a38..5051b16 100644 --- a/resources/views/fields/camera-capture.blade.php +++ b/resources/views/fields/camera-capture.blade.php @@ -41,17 +41,43 @@ document.addEventListener('DOMContentLoaded', () => { -
+{{--
+ --}} + +
+ + + + + -
+ +{{-- +
Capture Retake Switch Camera Verify -
+
--}} +
+ Capture + Retake + Switch Camera + Verify +
+ + + + + {{-- --}} {{-- --}} @@ -185,8 +211,13 @@ document.addEventListener('DOMContentLoaded', () => { const snapshot = this.$refs.snapshot; const context = canvas.getContext('2d'); + canvas.width = video.videoWidth; + canvas.height = video.videoHeight; + context.drawImage(video, 0, 0, canvas.width, canvas.height); - const dataUrl = canvas.toDataURL('image/png'); + + //const dataUrl = canvas.toDataURL('image/png'); + const dataUrl = canvas.toDataURL('image/png', 1.0); if (this.stream) this.stream.getTracks().forEach(track => track.stop()); @@ -230,9 +261,6 @@ document.addEventListener('DOMContentLoaded', () => { } } } - - -