explain my crazy thoughts Reviewed-on: #3 Co-authored-by: Nathan Teoh <me@nathanteoh.com> Co-committed-by: Nathan Teoh <me@nathanteoh.com> |
||
|---|---|---|
| img | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
Ditherpunk
What is this
This is a command-line tool that converts an image to a limited colorspace, utilizing dithering.
Currently, the following options are hardcoded:
- the 1bit color palette is hardcoded
- the desired output resolution
You can modify these in src/bayer.rs. However, it is my plan to make those user configurable.
Usage
ditherpunk <INPUT> <OUTPUT> <COMMAND>
Commands: bayer
error-diffusion
help Print this message or the help of the given subcommand(s)Arguments: <INPUT>
<OUTPUT>Options: -h, --help Print help -V, --version Print version
eg:
ditherpunk input_folder output_folder bayer --level 3
note: Currently
levelworks internally like[1,level]. It will generate all levels from 1 to the level you provide. I might change this behavior in the future.
Input image:
Output (3 levels)
Bugs
- Filename bug. yuck. ugly. I'll fix it i promise. Code underneath is real ugly im sorry.
Future of the project
I want to build a simple API and webapp, utilizing code I wrote here.
I also want to try and add other interesting dithering and half-toning methods.
Credits
Ditherpunk -- The article I wish I had about monochrome image dithering - Surma
Ordered Dithering - Wikipedia
Color QUantization and Dithering - Acerola



