#smart #filter #dithering #floyd-steinberg #blur

bin+lib undither

Smart filter to remove Floyd-Steinberg dithering from paletted images

7 stable releases

new 1.0.6 Jan 11, 2021
1.0.5 Jul 10, 2020
1.0.4 Jun 25, 2020
1.0.3 Apr 23, 2020
1.0.0 Oct 20, 2017

#1 in #smart

23 downloads per month

GPL-3.0+

20KB
509 lines

Undo Dithering

Smart filter to remove Floyd-Steinberg dithering from paletted images. It's smarter than "smart blur", because it takes into account limitations of image palette to decide what not to blur.

The tool analyses image palette to find optimal blurring threshold. For any two adjacent pixels, if the palette has a color that is between colors of these two pixels, then it's assumed to be an edge.

The algorithm is useful when converting PNG8 to JPEG, or anim-GIF to video.

Usage

From CLI

Install Rust and then run:

cargo install undither --features=binary
undither palette-image.png truecolor-output.png

As a library

See API reference.

Examples

Dithered Undithered
Dithered Undithered
Dithered Undithered

Dependencies

~770KB
~14K SLoC