https://github.com/vafdaf12/dithery-do
Theme an image using a pre-defined palette
https://github.com/vafdaf12/dithery-do
art colorimetry cpp dithering image-processing
Last synced: about 1 month ago
JSON representation
Theme an image using a pre-defined palette
- Host: GitHub
- URL: https://github.com/vafdaf12/dithery-do
- Owner: Vafdaf12
- License: mit
- Created: 2023-06-16T12:44:23.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-04T17:23:52.000Z (over 2 years ago)
- Last Synced: 2026-01-03T01:06:09.827Z (6 months ago)
- Topics: art, colorimetry, cpp, dithering, image-processing
- Language: C++
- Homepage:
- Size: 423 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dithery-Do
Dithery-Do is mostly an artistic project that provides methods to colour an image according
to some pre-defined pallette, kind of like how an artists paints their pictures. More generally
though, this project serves as an exploration of image dithering and efficient image processing.

# Usage
The general CLI syntax for Dithery-Do is the following
```
DitheryDo [--help] [--version] [-o VAR] -algo VAR -space VAR --channel VAR input palette
```
where:
- `input` = The input image
- `palette` = Path to palette file
- `-o` = Path to output file (`output.jpg` by default)
- `-a`/`-algo` = The color selection algorithm to use
- `-s`/`-space` = The color space to use for selection
- `-v`/`--vector` = The direction vector to use for the `dot_blend` algorithm (see below)
*Note: the necessary parameters can also be found by running `./DitherDo --help`*
Dithery Do currently supports RGB, XYZ, and L*a*b* (using D65 or D50 as illuminant)
The selection algorithms are a bit more involved:
- `euclid` = Smallest euclidian distance from the target
- `line` = Blends between 2 selected colors based on a dot product
- `dot_blend` = Partitions the palette based on a dot product and blends between colors from each partition
# Building
Building this project requires CMake, which can be installed on Debian-based OSs with
```bash
sudo apt install cmake
```
Once installed, the project can be built with
```bash
make
```
The compiled binary can be found in `build/DitheryDo`