未验证 提交 1c825dd5 编写于 作者: A Alexander Smorkalov 提交者: GitHub

Merge pull request #22613 from erasta:patch-1

Opencv.js: on imread add willReadFrequently to getContext
......@@ -55,7 +55,7 @@ Module['imread'] = function(imageSource) {
canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
ctx = canvas.getContext('2d');
ctx = canvas.getContext('2d', { willReadFrequently: true });
ctx.drawImage(img, 0, 0, img.width, img.height);
} else if (img instanceof HTMLCanvasElement) {
canvas = img;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册