Skip to content
🌽

sweetcorn

Turn smooth pixels into crunchy kernels

Sweetcorn is a collection of JavaScript image dithering tools for Sharp.

30+ built-in algorithms

Includes a range of threshold maps and error diffusion kernels, including classics like Floyd-Steinberg, Atkinson, Bayer matrixes, and more.

Customizable

Experiment with your own threshold maps and error diffusion kernels for creative effects.

Flexible pipeline

Plugs into any Sharp-based image processing pipeline, allowing processing before and after the dithering is applied.

Astro image service

An Astro integration makes it easy to dither images in your Astro websites with sweetcorn.