Implementation of Floyd-Steinberg dithering.
Go to file
opfez 8b28eb4c29 update readme, add (un)license 2021-08-14 11:12:30 +02:00
Makefile initial 2021-08-13 12:30:44 +02:00
README update readme, add (un)license 2021-08-14 11:12:30 +02:00
UNLICENSE update readme, add (un)license 2021-08-14 11:12:30 +02:00
dither.c update readme, add (un)license 2021-08-14 11:12:30 +02:00

README

Simple implementation of the Floyd-Steinberg dithering algorithm.

Usage: dither < input.ppm > output.ppm

dither only accepts PPM images (P3). It outputs in the same format.

You can easily convert images to PPM format for processing with ImageMagick:

$ convert in.png -compress none in.ppm

This also works for other formats, like jpeg.

I've had problems converting back to PNG from PPM with ImageMagick though. For
that, I recommend using ffmpeg:

$ ffmpeg -i out.ppm out.png


Known errors:
The program seems to be broken for many images, causing a segmentation fault.