diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index bbc808be281b23d8badb091f9fdf8063a33f90f4..a551c737975479221bcf2384427baf5f1811fdfb 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -16,6 +16,7 @@ * [split](commands/split.md) * [palette](commands/palette.md) * [remap](commands/remap.md) +* [swap](commands/swap.md) * [pipeline](commands/pipeline.md) ### Pipelines diff --git a/docs/commands/palette.md b/docs/commands/palette.md index 41035da3320aa366546732713a90ca75ae2d6295..ca14cbf3599a5cb4a7c8432aaa23c210873f4c90 100644 --- a/docs/commands/palette.md +++ b/docs/commands/palette.md @@ -19,6 +19,11 @@ Options: -V, --version Print version ``` +### Palette Swapping + +This command can also generate a template for use with the Swap command by specifying `--format columns`. The output will be a PNG +formatted image with a width of `2`, where each row is a unique colour found in the input image. + ## Example  \ No newline at end of file diff --git a/docs/commands/swap.md b/docs/commands/swap.md new file mode 100644 index 0000000000000000000000000000000000000000..bac21c79e81fa6640cd366f29f8e663a2930975b --- /dev/null +++ b/docs/commands/swap.md @@ -0,0 +1,24 @@ +# Command: Palette Swap + +Use a given mapping of colours to alter the input image. The palette image must contain 2 columns, and any colour in the +input image will be checked against the first column of the palette, and if found will be replaced with the corresponding colour in the second column. + +## Usage + +```text +Usage: crunch swap --palette <PALETTE> <INPUT> <OUTPUT> + +Arguments: + <INPUT> The path to the image file + <OUTPUT> The path to write the recoloured image + <PALETTE> The path to the palette image + +Options: + -p, --palette <PALETTE> The path to the palette file containing the output colours + -h, --help Print help + -V, --version Print version +``` + +## Example + + \ No newline at end of file diff --git a/docs/images/Swap.png b/docs/images/Swap.png new file mode 100644 index 0000000000000000000000000000000000000000..36c2753c3c4b4ccd0ae966ab49bc6907484842db Binary files /dev/null and b/docs/images/Swap.png differ