samplesAreBlankfunction
True when every sampled pixel is black, which is the picture the service returns for a day it has no swath for (a 200, not a 404).
Import it
import { samplesAreBlank } from "@johnmorrisdotca/chikyu-earth/door";
Definition
function samplesAreBlank(pixels: Uint8ClampedArray): boolean
Parameters
| Name | Type | Description |
|---|---|---|
pixels | Uint8ClampedArray<ArrayBufferLike> | RGBA bytes. |
Returns
boolean
Whether every pixel is black.
Examples
import { samplesAreBlank } from "@johnmorrisdotca/chikyu-earth/door";
console.log(samplesAreBlank(new Uint8ClampedArray([0, 0, 0, 255])));trueWhat it prints (run when this page was built)