Floyd-Steinberg dithering algorithm C++ implementation.
This program works as a console utility. In order to process image you need to supply a color palette and an image to the program:
./dithering_app MyColors.json MyPicture.png
Color palette is a set of colors that the result image must consist of. Color palette format is JSON.
Here is example of black-white color palette:
{
"palette": [
"000000",
"ffffff"
]
}
You can find more examples of color palettes in "configs" folder.
Here is the original image:
Here is dithered image:
You can also dither multicolored image, not only grayscale. Original:
Dithered:
Images of PNG and JPEG formats are supported. Transparent images are not supported.
Program doesn't use any platform specific APIs, so it's crossplatform.
This program and sources are distributed under the MIT licence.
Media resources used in this project are distributed under their respective license.
Unsplash license: https://unsplash.com/license