Skip to content

gustavomedeiross/floyd-steinberg

Repository files navigation

Floyd-Steinberg Dithering

This is an implementation of the Floyd-Steinberg dithering algorithm in OCaml.

Usage

$ dune exec ./src/main.ml input-image.jpg output-image.jpg

Example

Original Image (3 bytes per pixel):


Color Compression - No Dithering (3 bits per pixel):


Color Compression - Floyd-Steinberg Dithering (3 bits per pixel):


If you look closely on the image generated by the Floyd-Steinberg algorithm, you can see that the pixels have very "raw" colors (3 bits gives us just 8 colors)

About

Floyd–Steinberg dithering implementation in OCaml

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages