#ditherJS
A javascript library which transforms an element into a dithered image using a fixed palette.
###Usage: HTML:
<img src="..." class="dither" />
JS:
new DitherJS('.dither'[,options]);
or as a jQuery plugin
$('.dither').ditherJS(options);
options are defined as:
var options = {
"step": n // The step for the pixel quantization n = 1,2,3...
"palette": palette // an array of colors as rgb arrays
"className": "dither" // can be whatever class used in the constructor
"algorithm": "ordered" // can be "ordered" or "errorDiffusion"
};
the monochrome branch supports also
"monochrome": true
Useful as a comb to a bald man. -Anon
- jquery plugin wrapper
author 2014 Daniele Piccone
license GPL