标签: html5-canvas
代码
canvas.width=900 //cropping canvas.height=414 //cropping ctx.drawImage(img, 0, 0, 900, img.height * (900/img.width)); //resize propportionally document.body.appendChild(canvas); //show final image
我想不仅从右上角裁剪图像,还要从左上角,中间,左下角,右边的机器人裁剪图像。我该怎么做?