| Crates.io | ditherer |
| lib.rs | ditherer |
| version | 0.1.5 |
| created_at | 2025-03-23 15:16:13.758813+00 |
| updated_at | 2025-03-23 15:21:28.46947+00 |
| description | Fun little Bayer matrix ditherer in Rust. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1602752 |
| size | 42,027 |
A command-line utility for applying Bayer matrix dithering to images. The tool supports grayscale and color dithering using various Bayer matrix sizes (2x2, 4x4, 8x8) and offers options to preserve pixel brightness order during dithering.
2x2, 4x4, or 8x8.If you have Rust installed, you can build and run the tool with the following commands:
cargo install ditherer
Alternatively, you can download precompiled binaries for your platform from the releases section of this repository.
ditherer [OPTIONS]
-i, --input <INPUT_IMG>
Path to the input image file (optional). If not provided, the image will be read from stdin.
-o, --output <OUTPUT_IMG>
Path to save the output image (optional). If not provided, the output will be written to stdout.
-m, --matrix-size <MATRIX_SIZE>
Specify the Bayer matrix size for dithering. Options:
m2: 2x2 matrixm4: 4x4 matrixm8: 8x8 matrix-c, --color
Apply dithering on the brightness channel of color images. By default, dithering will be applied to grayscale images.
-p, --preserve-order <PRESERVE_ORDER>
When color dithering is enabled, specify whether to preserve the "dark" or "light" pixels' order. Options:
dark: Preserve dark pixels' order.light: Preserve light pixels' order.-h, --help
Show help message.
--version
Show the version of the tool.
ditherer -i input.png -o output.png -m m4
ditherer -i input.png -o output.png -m m8 -c -p dark
cat input.png | ditherer -o output.png -m m2
ditherer -i input.png -m m4
This project is licensed under the MIT License - see the LICENSE file for details.