Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kornelski/undither
Smart filter to remove Floyd-Steinberg dithering from paletted images
https://github.com/kornelski/undither
c dithering palette paletted-images pixels reconstruction smart-blur smoothing undither
Last synced: 2 days ago
JSON representation
Smart filter to remove Floyd-Steinberg dithering from paletted images
- Host: GitHub
- URL: https://github.com/kornelski/undither
- Owner: kornelski
- Created: 2014-03-29T16:16:42.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2023-11-15T01:45:13.000Z (about 1 year ago)
- Last Synced: 2024-04-14T13:51:58.772Z (9 months ago)
- Topics: c, dithering, palette, paletted-images, pixels, reconstruction, smart-blur, smoothing, undither
- Language: Rust
- Homepage: https://lib.rs/undither
- Size: 27.3 KB
- Stars: 47
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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](https://imageoptim.com/api/ungif).
## Usage
### From CLI
[Install Rust](https://www.rust-lang.org/install.html) and then run:
```sh
cargo install undither --features=binary
undither palette-image.png truecolor-output.png
```### As a library
See [API reference](https://docs.rs/undither).
## Examples
Dithered | Undithered
:------: | :--------:
![Dithered](https://cloud.githubusercontent.com/assets/72159/2559943/e076175e-b796-11e3-8006-95b16b9563f8.png) | ![Undithered](https://cloud.githubusercontent.com/assets/72159/2559942/e0724f98-b796-11e3-8ba3-0347b852fbef.png)
![Dithered](https://cloud.githubusercontent.com/assets/72159/2558878/adb5e0ce-b75f-11e3-8ab4-3e78a4f32ecb.png) | ![Undithered](https://cloud.githubusercontent.com/assets/72159/2558877/ad96f114-b75f-11e3-9768-b99f69748a90.png)