Home

Awesome

node-dithering

available algorithms:

All of them using this method signature:

function(inPixels, width, height, palette)

where

Return is an unsigned byte ArrayBuffer with the indexed output values in consecutive pixels, i.e. indices from the colour palette (hence these values are from 0..255 and the palette can hold a maximum of 256 colours, so that's why the unsigned byte type).

This is deliberately raw and unpacked for speed reasons.

warning

this is under development so expect BOMBS to fall all around you. alternatively your script might hang. boom!