CodingTrain / CodingTrain/Suggestion-Box

Background() code for image object

Open
#1,669 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
570
Forks
85
PR merge metrics
No merged PRs in 30d

Description

HI! We are all familiar with the background code to clear off our canvas to continue rendering other stuff. But we dont have a “background()” code for our image. I could use this function
```js
for (let i in img.pixels) {
img.pixels[i] = 255;
}
```
But it is not very efficient in performance. I wondered if there is another way I could achieve this without losing too much performance?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.