Function: pixelFingerprint()
pixelFingerprint(
rgba):number
Defined in: src/lib/image/index.ts:52
A quick fingerprint of RGBA pixels (FNV-1a over each pixel), to tell whether they changed without keeping a copy of them. Different pixels give the same fingerprint only very rarely (about 1 in 4 billion).
Parameters
rgba
Uint8ClampedArray
Returns
number
Example
const print = pixelFingerprint(layer.context.getImageData(0, 0, layer.width, layer.height).data);
if (print !== savedPrint) save(layer);