Skip to main content
chespio
Inspiring
December 5, 2022
Question

[canvas] Warning on getImageData uses from create.js library

  • December 5, 2022
  • 1 reply
  • 1488 views

Hello all!

 

I'm using Chrome to test my canvas and I get a lot of these warning message:

 

Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
b._testHit @ createjs.min.js:13
b._getObjectsUnderPoint @ createjs.min.js:13
b._getObjectsUnderPoint @ createjs.min.js:13
b._testMouseOver @ createjs.min.js:13
(anonymous) @ createjs.min.js:13
setInterval (async)
b.enableMouseOver @ createjs.min.js:13
handleComplete @ Burger_08a.html?8407550:116
(anonymous) @ Burger_08a.html?8407550:94
b._dispatchEvent @ createjs.min.js:12
b._dispatchEvent @ createjs.min.js:12
b.dispatchEvent @ createjs.min.js:12
b._sendComplete @ createjs.min.js:16
b._loadNext @ createjs.min.js:17
b._processFinishedLoad @ createjs.min.js:17
b._handleFileComplete @ createjs.min.js:17
(anonymous) @ createjs.min.js:12
b._dispatchEvent @ createjs.min.js:12
b._dispatchEvent @ createjs.min.js:12
b.dispatchEvent @ createjs.min.js:12
b._sendComplete @ createjs.min.js:16
b._handleAudioDecoded @ createjs.min.js:18
(anonymous) @ createjs.min.js:15

 

My javascript comprehension is quite basic. so I'm just guessing, this may be a way to reduce resource consumption. But not sure where do I should set willReadFrequently attribute to true.

Thanks

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    December 5, 2022

    you should be testing from adobe animate > control > test movie > in browser.

     

    otherwise, if you open the published html from your local drive, you will see crose-domain errors when trying to load assets (like images).

     

    you can also, upload to a server and test.

    chespio
    chespioAuthor
    Inspiring
    December 5, 2022

    Thank you Kglad!

    Yes, I am testing that way. 
    using the Adobe Animate localServer URL something like; http://127.0.0.1:8090/blablabla.html?6915 

    But not sure what it does it mean, or if this is a reason to worry about high resource consumption.

      

    kglad
    Community Expert
    Community Expert
    December 5, 2022

    it means you're violating a browser cross-domain restriction.

     

    again, test using animate or upload to a server and test.