Added png instead of jpeg in ocr
This commit is contained in:
@@ -329,13 +329,13 @@ function cameraCapture() {
|
||||
|
||||
// Show snapshot
|
||||
const snapshot = this.$refs.snapshot;
|
||||
snapshot.src = canvas.toDataURL('image/jpeg');
|
||||
snapshot.src = canvas.toDataURL('image/png');
|
||||
snapshot.classList.remove('hidden');
|
||||
video.classList.add('hidden');
|
||||
|
||||
// Convert canvas to file
|
||||
canvas.toBlob(async blob => {
|
||||
const file = new File([blob], 'capture.jpeg', { type: 'image/jpeg' });
|
||||
const file = new File([blob], 'capture.png', { type: 'image/png' });
|
||||
console.log("File ready for upload:", file);
|
||||
|
||||
// Upload to temp folder
|
||||
@@ -355,7 +355,7 @@ function cameraCapture() {
|
||||
} else {
|
||||
alert('Failed to save image.');
|
||||
}
|
||||
}, 'image/jpeg', 1.0); // 1.0 = highest quality
|
||||
}, 'image/png', 1.0); // 1.0 = highest quality
|
||||
|
||||
this.photoTaken = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user