From 1f7ed201c2d017958d73ffafb1d2cee1e6eadcba Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Thu, 9 Jul 2026 17:02:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=81=87=E5=88=86=E8=BE=A8=E7=8E=87?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E6=A0=87=E9=9D=B6=E4=BD=8D=E7=BD=AE=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/wuyuanbiaoba/components/CameraView.jsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/client/src/sections/wuyuanbiaoba/components/CameraView.jsx b/client/src/sections/wuyuanbiaoba/components/CameraView.jsx index 2f981be..e21cb7e 100644 --- a/client/src/sections/wuyuanbiaoba/components/CameraView.jsx +++ b/client/src/sections/wuyuanbiaoba/components/CameraView.jsx @@ -158,10 +158,8 @@ const CameraView = ({ if (imgRef.current) { const img = imgRef.current; if (img.naturalWidth && img.naturalHeight) { - // setVideoNaturalWidth(img.naturalWidth); - // setVideoNaturalHeight(img.naturalHeight); - setVideoNaturalWidth(8000); // 暂时用假的 - setVideoNaturalHeight(6000); // 暂时用假的 + setVideoNaturalWidth(img.naturalWidth); + setVideoNaturalHeight(img.naturalHeight); // console.log(`handleImageLoad: 视频原始分辨率: ${img.naturalWidth}x${img.naturalHeight}`); } resizeCanvas(); @@ -1303,7 +1301,7 @@ const CameraView = ({ }} >
- 摄像头分辨率: {videoNaturalWidth} × {videoNaturalHeight} + 摄像头分辨率: {8000} × {6000}
缩放: {Math.round(scale * 100)}%