TRI is like git but for image manipulation.
First, initialize the repo.
tri init --path image.png
Now you can make commits using any ImageMagick command, e. g.:
tri commit crop 50x50+0x0
tri commit monochrome
tri commit rotate 90
Check logs:
tri log
Print commit tree:
tri tree
Reset the HEAD to another commit by specifying the unique first few characters of the hash (run tri tree or log to see the hashes):
tri reset 9f
1. Install nix Nix official instruction
nix profile install github:WhiteBlackGoose/tri \
--extra-experimental-features 'nix-command flakes'
export XDG_DATA_DIRS="~/.nix-profile/share:$XDG_DATA_DIRS"
to your .bashrc (or your shell's corresponding file).
If you're a NixOS user, add this repo as flake input:
tri-input.url = "github:WhiteBlackGoose/tri";Then you can add it as module:
{ environment.systemPackages = [ tri-input.packages.${system}.default ]; }You will need Rust, imagemagick. Build the repo, and optionally install man pages and shell completions from ./artifacts.
If you run Nix, you can simply call
man tri
If you do not run Nix on Linux, you can see the man-page manually by calling the following command in the project folder after you built the project (using cargo build):
man ./artifacts/tri.1
Or refer to web version.