mcfsd
v1.2.1
Published
Multicolor Floyd Steinberg dithering.
Downloads
37
Maintainers
Readme
✨ MCFSD
Multicolored Floyd Steinberg Dithering
🔽 Installation
$ npm install mcfsd
❔ Basic Usage Example
(Jimp)
const Jimp = require("jimp");
const mcfsd = require("mcfsd");
(async () => {
let image = await Jimp.read("example.jpg");
//
// Dithering Factor ---------+---> Every what pixel(s)
// |
// Image Bitmap -| |
// V V
let ditheredBitmap = await mcfsd(image.bitmap, 5);
let ditheredImage = await Jimp.create(ditheredBitmap);
await ditheredImage.writeAsync("dithered_example.jpg");
})();