1 <!DOCTYPE html
><meta charset=utf-
8>
2 <body class=
"reftest-wait">
3 <canvas style=
"width: 200px;" id=
"canvas"></canvas>
5 const ctx1
= document
.getElementById("canvas").getContext("2d");
6 const img1
= new Image();
8 ctx1
.canvas
.width
= img1
.width
;
9 ctx1
.canvas
.height
= 200;
10 ctx1
.drawImage(img1
, 0, 0);
11 document
.body
.classList
.remove("reftest-wait");
13 img1
.src
= "red_tall.png";