mcfsd

1.2.1 • Public • Published

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");
})();

Package Sidebar

Install

npm i mcfsd

Weekly Downloads

5

Version

1.2.1

License

MIT

Unpacked Size

4.59 kB

Total Files

4

Last publish

Collaborators

  • armagan_