答案 0 :(得分:2)
已经尝试scale
了吗?
canvas.scale(xScale, yScale);
答案 1 :(得分:0)
试试这个
canvas,
img {
image-rendering: crisp-edges;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: optimize-contrast;
-ms-interpolation-mode: nearest-neighbor;
}
https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering