projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3ebafb
)
add willReadFrequently on imread in js
author
Eran Geva
<eran.geva@gmail.com>
Sat, 8 Oct 2022 09:05:33 +0000
(12:05 +0300)
committer
GitHub
<noreply@github.com>
Sat, 8 Oct 2022 09:05:33 +0000
(12:05 +0300)
modules/js/src/helpers.js
patch
|
blob
|
history
diff --git
a/modules/js/src/helpers.js
b/modules/js/src/helpers.js
index
a2f3101
..
59e6e65
100644
(file)
--- a/
modules/js/src/helpers.js
+++ b/
modules/js/src/helpers.js
@@
-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;