diff --git a/public/self/js/Director/detection.js b/public/self/js/Director/detection.js index b165e0ddc..c822d7515 100644 --- a/public/self/js/Director/detection.js +++ b/public/self/js/Director/detection.js @@ -2853,8 +2853,8 @@ function isJSON(str) { img.onload = function(){ loadFinished = false; // 初始设置画布大小,最大值宽和高 - canvas.width = maxWidth;//document.getElementById("tool0").offsetWidth; - canvas.height = maxHeight;//document.getElementById("tool0").offsetWidth/1280*720; + canvas.width = img.width;// maxWidth document.getElementById("tool0").offsetWidth; + canvas.height =img.height;//maxHeight document.getElementById("tool0").offsetWidth/1280*720; //调整画布大小 if ((img.width/img.height)<(canvas.width/canvas.height)){ canvas.width=canvas.height * img.width / img.height;