git-diff-img icon indicating copy to clipboard operation
git-diff-img copied to clipboard

📷 Diff Git versioned images graphically.

git-diff-img

Example difference after replacing the left hand side with the right The result of git diff-img. Sample image by Muband from the Spot the difference Wikipedia article; distributed under a CC BY-SA 3.0 license

Installation

System Prerequisites

Install ImageMagick: sudo apt install imagemagick

As a Git configuration (recommended)

git config --global alias.diff-img difftool\ -x\ \''compare -alpha copy "$LOCAL" "$REMOTE" png:- | montage -mode concatenate "$LOCAL" png:- "$REMOTE" png:- | display -title "$BASE: Local | Diff | Remote" png:-'\'

As an executable (not recommended)

This is an alternative installation procedure that is unnecessary if the Git configuration is used. It's not recommended because it requires an understanding of PATH lookup

curl https://raw.githubusercontent.com/niedzielski/git-diff-img/master/git-diff-img -o ~/bin/git-diff-img &&
chmod +x ~/bin/git-diff-img

Usage

Execute against images only: git diff-img **.png

Examples

The percentage symbol differs Version a font sprite sheet and see the concrete difference in each commit.

Links

License (Public Domain)

All code is public domain and may be used without limitation.