From b5c092b73a2f922f59b8eafe336a8872e5accda5 Mon Sep 17 00:00:00 2001 From: "afiq.hamzah" Date: Tue, 23 May 2023 15:42:11 +0800 Subject: [PATCH] Add enhancement to camera --- app/Services/MarhunPhotoService.php | 2 +- public/js/marhun-photo-capture.js | 6 ++---- resources/views/marhun/partials/camera_modals.blade.php | 4 ++-- .../marhun/partials/camera_modals_per_marhun.blade.php | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/Services/MarhunPhotoService.php b/app/Services/MarhunPhotoService.php index f8e2cd9f..63392384 100644 --- a/app/Services/MarhunPhotoService.php +++ b/app/Services/MarhunPhotoService.php @@ -153,6 +153,6 @@ class MarhunPhotoService $webpCompiler = $this->getWebpCompilerByOS(); - exec($webpCompiler . ' -preset photo ' . ' -resize 1920 1080 ' . ' -mt ' . $originalFilePath . ' -o ' . $convertedFilePath); + exec($webpCompiler . ' -preset photo ' . ' -resize 1280 720 ' . ' -mt ' . $originalFilePath . ' -o ' . $convertedFilePath); } } diff --git a/public/js/marhun-photo-capture.js b/public/js/marhun-photo-capture.js index 33ad724b..32d01223 100644 --- a/public/js/marhun-photo-capture.js +++ b/public/js/marhun-photo-capture.js @@ -71,8 +71,6 @@ function marhunPhotoCapturerFactory(modal_selector) { setMarhunPhotoInputToCapturedPhoto(blob) - - }, 'image/png'); }) .catch((err) => { @@ -161,8 +159,8 @@ function marhunPhotoCapturerFactory(modal_selector) { function composeConstraint(camera) { let constraints = { - width: { exact: 1920 }, - height: { exact: 1080 }, + width: { exact: 3200 }, + height: { exact: 1800 }, }; if (camera.deviceId !== '') { diff --git a/resources/views/marhun/partials/camera_modals.blade.php b/resources/views/marhun/partials/camera_modals.blade.php index d3db00ce..1b3956e0 100644 --- a/resources/views/marhun/partials/camera_modals.blade.php +++ b/resources/views/marhun/partials/camera_modals.blade.php @@ -22,7 +22,7 @@ src="" width="960" class="border border-dark d-none">