Skip to content

Commit d1f870e

Browse files
committed
README
1 parent 45dde5e commit d1f870e

File tree

2 files changed

+37
-27
lines changed

2 files changed

+37
-27
lines changed

README.md

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,51 @@
1-
# imgmod
2-
## CLI tool for performing logical, arithmetic, and bitwise operations on an image given a color.
1+
# imgfx-cli
2+
## Command-line front-end for my crate imgfx.
33

4-
----------
5-
## Features
6-
- and, or, xor
7-
- add, sub, div, mult
8-
- Bitwise left & right
4+
Provides configurable low-level operations (arithmetic, logical, bitwise) and high-level operations (bloom, blending modes, pixel sorting) for images.
95

10-
- Standard in/out image for pipelines
11-
- Customizable left and right-hand side of operations
12-
- Negate the result of the logical operations with the -n flag
6+
Functions:
7+
8+
add, sub, mult, div
9+
bitshift left | right
10+
and, or, xor (and their complements with -n flag)
11+
screen, overlay, average
12+
bloom
13+
14+
All functions support operand reordering, allowing precise control over how the image's color channels are processed. Operand reordering lets you redefine how the source image's R, G, and B channels are mapped during the operation.
15+
16+
Each function accepts an image::DynamicImage and returns an image::RgbaImage.
1317

1418
## Installation
1519

16-
To install `imgmod`, clone the repository and build it with `cargo`:
20+
To install `imgfx-cli`, clone the repository and build it with `cargo`:
1721

1822
```bash
19-
git clone https://github.com/Echinoidea/img-mod.git imgmod
20-
cd imgmod
23+
git clone https://github.com/Echinoidea/imgfx-cli.git imgfx-cli
24+
cd imgfx-cli
2125
cargo build --release
2226
```
2327

2428
## Usage
2529
```
26-
Usage: imgmod [OPTIONS] <COMMAND>
30+
Arithmetic, logical, bitwise, filtering, and higher level operations for images.
31+
32+
Usage: imgfx [OPTIONS] <COMMAND>
2733
2834
Commands:
29-
or
30-
and
31-
xor
32-
left
33-
right
34-
add
35-
sub
36-
mult
37-
div
38-
help Print this message or the help of the given subcommand(s)
35+
or
36+
and
37+
xor
38+
left
39+
right
40+
add
41+
sub
42+
mult
43+
div
44+
avg
45+
screen
46+
overlay
47+
bloom
48+
help Print this message or the help of the given subcommand(s)
3949
4050
Options:
4151
-i, --input <INPUT> path/to/input/image
@@ -49,14 +59,14 @@ Options:
4959
```
5060

5161
## Examples
52-
```imgmod -i samurai-jack.jpg left 1 | imgmod xor ff0000 --lhs b b b --rhs r r r -n | imgmod and ff0000 | imgmod left 1 > output.png```
62+
```imgfx -i samurai-jack.jpg left 2 --lhs r r r | imgfx and ff0000```
5363
![input](docs/images/samurai-jack.jpg)
5464
![output](docs/images/output-samurai-jack.png)
5565

56-
```imgmod -i flcl.png left 4 | imgmod and f7c788```
66+
```imgfx -i flcl.png left 2 --lhs r r r | imgfx screen f1c5a7```
5767
![input](docs/images/flcl.png)
5868
![output](docs/images/output-flcl.png)
5969

60-
```imgmod -i ultramurder.png div ff0000 --lhs g g g --rhs b r b```
70+
```imgfx -i ultramurder.png div ff0000 --lhs g g g --rhs b r b```
6171
![input](docs/images/ultramurder.png)
6272
![output](docs/images/output-ultrakill-isolated.png)

docs/images/output-flcl.png

51.9 KB
Loading

0 commit comments

Comments
 (0)