sweetcorn
v0.3.0
Published
JavaScript image dithering tools for Sharp
Readme
sweetcorn
JavaScript image dithering tools for Sharp
Installation
npm install sweetcornBasic usage
import sharp from 'sharp';
import sweetcorn from 'sweetcorn';
const inputImage = await sharp('input.png');
const ditheredImage = await sweetcorn(inputImage, {
algorithm: 'floyd-steinberg',
});
ditheredImage.webp({ lossless: true }).toFile('output.webp');Documentation
Learn more in the Sweetcorn documentation site.
