]> Zhao Yanbai Git Server - acecode.git/commitdiff
...
authoracevest <zhaoyanbai@126.com>
Sun, 17 Jan 2021 06:29:35 +0000 (14:29 +0800)
committeracevest <zhaoyanbai@126.com>
Sun, 17 Jan 2021 06:29:35 +0000 (14:29 +0800)
projects/esp32_video_stream/esp32camweb/canvas.html

index 359eb7ef2d3f8be0255911f9148796eba23c9500..06d1810790011b4aad5dfacdb985542af5e37f2a 100644 (file)
@@ -12,7 +12,7 @@
 </head>
 
 <body>
-    <canvas id="Video" width="240" height="320"></canvas>
+    <canvas id="Video" width="120" height="160"></canvas>
     <pre id="Stat"></pre>
     <pre id="Msg"></pre>
 
@@ -76,9 +76,9 @@
                 image.onload = () => {
                     URL.revokeObjectURL(image.src);
                     ctx.save();
-                    ctx.translate(120, 180);
+                    ctx.translate(60, 80);
                     ctx.rotate(90*(Math.PI/180));
-                    ctx.translate(-180, -120);
+                    ctx.translate(-80, -60);
                     ctx.drawImage(image, 0, 0);
                     ctx.restore();
                 }