Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

"GetImageData", less resource consumption

New Here ,
Aug 13, 2024 Aug 13, 2024

Hello all. I'm a total beginner with coding. 

 

My canvas projects runs well with no issues, but when testing in-browser, I'm met with multiple warnings: "Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true" (see attached). No idea how to do this.

 

The closest lead I've found is from this forum, with the answer "You need to download and link local the create.js library". How is this done? I've tried opening the local JS file and cannot find any "canvas.getContext" or "getImageData" lines (see attached).

 

Limiting resource consumption is my main goal here. I know this warning can ultimately be ignored, but my project is full of art and animations, and the project feels as if it's struggling the longer it runs. Do I have no other choice but to cut content out? 

 

Any help is appreciated. 

TOPICS
Code , How to , Performance
288
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 14, 2024 Aug 14, 2024
LATEST

your first image shows a warning, not an error.  heed the warning if you see a performance issue.

 

p.s. copy and paste screenshots into replies, do not attach them.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines