feat: adjust photo capture effects and improve image quality in ShootingView
This commit is contained in:
@@ -271,14 +271,14 @@ const captureSinglePhoto = () => {
|
||||
if (filter === 'black&white') {
|
||||
applyBlackAndWhite(context, finalWidth, finalHeight, 3);
|
||||
} else {
|
||||
applyFilmEffect(context, finalWidth, finalHeight, 5); // Default volume = 5
|
||||
applyFilmEffect(context, finalWidth, finalHeight, 2); // Default volume = 5
|
||||
}
|
||||
|
||||
|
||||
drawDateStamp(context, finalWidth, finalHeight);
|
||||
// drawDateStamp(context, finalWidth, finalHeight);
|
||||
|
||||
// แปลงเป็น base64 ด้วย quality 0.7 เพื่อลดขนาด
|
||||
const photoDataUrl = canvas.toDataURL('image/jpeg', 0.7)
|
||||
const photoDataUrl = canvas.toDataURL('image/jpeg', 0.8)
|
||||
photos.value.push(photoDataUrl)
|
||||
currentPhotoIndex.value++
|
||||
|
||||
@@ -525,6 +525,7 @@ const retakePhoto = () => {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.hidden-canvas {
|
||||
|
||||
Reference in New Issue
Block a user