There was an error while loading. Please reload this page.
1 parent 1ef930c commit ddf3ba6Copy full SHA for ddf3ba6
1 file changed
docs/reference/images/monochrome.md
@@ -8,9 +8,11 @@ a boolean which returns true if the image is black and white. The boolean expres
8
Create a custom image detecting if the image has black and white, it logs into the console's serial output. Otherwise it throws an error.
9
``` ts
10
const customImage = image.create(160, 120);
11
+ customImage.setPixel(5, 5, 1);
12
+ customImage.setPixel(15, 15, 15);
13
if (customImage.isMono) {
- console.log("Your Image Is Valid")
14
+ console.log("Your Image Is Valid");
15
} else {
- throw "Error: This Image is Invalid"
16
+ throw "Error: This Image is Invalid";
17
}
18
```
0 commit comments