fix: 可以正确旋转了

pull/199/head
youxia 3 years ago
parent 4d9aa7248f
commit 0e732d3303

@ -104,14 +104,14 @@ function getCroppedImg(
// draw rotated image and store data. // draw rotated image and store data.
ctx.drawImage( ctx.drawImage(
image, image,
crop.x,
crop.y,
crop.width,
crop.height,
0, 0,
0, 0,
canvas.width, image.width,
canvas.height image.height,
-crop.x * scale,
-crop.y * scale,
image.width * scale,
image.height * scale
); );
} }

Loading…
Cancel
Save