3 ms·
OP: Given that I'm doing this in a 2D canvas - with no help from web workers, webgl, wasm, etc - I'm quite impressed to get a 10fps output on my local machine.
by rikroots 5y ago
OP: Given that I'm doing this in a 2D canvas - with no help from web workers, webgl, wasm, etc - I'm quite impressed to get a 10fps output on my local machine.
The reduce-palette filter is good for black-white and grayscale dithering, and can also calculate a commonest colors palette (based on euclidean distance) in the LAB color space.
Edit: I've tested on chrome on desktop. Interested to hear on which devices it doesn't work.