Update image in camera drawer

This commit is contained in:
Xin Wang
2026-06-02 15:34:50 +08:00
parent 2348b2e5a8
commit 0928169106
12 changed files with 11 additions and 5 deletions

View File

@@ -27,10 +27,12 @@ const CAMERA_DONE_TEXT = "【拍摄完成】";
// Sample images shown as thumbnails under the camera preview. Same-origin files
// so they can be drawn to a canvas (for base64 + dimensions) without tainting.
const SAMPLE_IMAGES = [
{ src: "./samples/front-damage.jpg", label: "车辆前部" },
{ src: "./samples/plate.jpg", label: "车" },
{ src: "./samples/license.jpg", label: "驾驶证" },
{ src: "./samples/scene.jpg", label: "事故现场" },
{ src: "./samples/damage1.png", label: "车辆前部" },
{ src: "./samples/damage2.png", label: "车辆后部" },
{ src: "./samples/plate1.jpg", label: "车牌 1" },
{ src: "./samples/plate2.jpg", label: "车牌 2" },
{ src: "./samples/user1.jpg", label: "人物 1" },
{ src: "./samples/user2.jpg", label: "人物 2" },
];
// Cap the longer edge before JPEG-encoding so payloads stay small.
const IMAGE_MAX_DIM = 1280;

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

View File

@@ -160,6 +160,10 @@ body {
z-index: 1;
}
.camera-drawer__photo {
object-fit: contain;
}
.camera-drawer__preview.is-camera .camera-drawer__video {
display: block;
}
@@ -338,7 +342,7 @@ body {
.camera-drawer__sample img {
width: 100%;
height: 100%;
object-fit: cover;
object-fit: contain;
display: block;
}