mirror of
https://github.com/opencv/opencv.git
synced 2025-06-08 01:53:19 +08:00
add willReadFrequently on imread in js
This commit is contained in:
parent
a3ebafbdeb
commit
68bd156a71
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user