original image size: 750x1334
canvas size: 750X1334
I"m going to lay a 750x1334 picture as the background on the canvas of 750x1334.
the code is as follows:
var image = new Image()
image.src = "/img/background.png"
image.onload = drawImg //
function drawImg () {
context.drawImage(image, 0, 0, 750, 1334)
}
canvas:
<canvas id="share" canvas-id="share" style="width:750px;height:1334px;">
</canvas>
the result looks like this. The picture on the left is canvas, and the picture on the right is the img of the original image as a comparison, 750x1334, that is, the last effect I want to draw
the picture has been stretched a lot. Why?