已经准备好了名为 canvasInput 和 canvasOutput 的 <canvas> 元素。点击 尝试一下 按钮来查看结果。您可以选择另一张图像。您可以更改 <textarea> 中的代码以进行更多研究。