1
0
Fork 0
mirror of https://github.com/matomo-org/matomo-icons.git synced 2024-09-19 17:03:45 +02:00
matomo-icons/tools/git-imgdiff.sh
Lukas Winkler 2892920495
update conversion of all icons
Unfortunately the newer versions of pngquant doesn't seem to result in
binary-identical images as before anymore.
So I updated directly to 3.x and updated all images at once.
I quickly scrolled through the list of visual diffs and none of the
icons changed visually
2024-07-21 00:50:40 +02:00

15 lines
612 B
Bash
Executable file

#!/bin/sh
# improved version of http://varya.me/en/posts/image-diffs-with-git/
# enable with `git config diff.image.command 'tools/git-imgdiff.sh'`
echo "$1"
compare "$2" "$1" tmp/diff.png
compare "$2" "$1" -fuzz 5% tmp/fuzzy.png
compare "$2" "$1" -fuzz 10% tmp/fuzzier.png
composite "$2" "$1" -compose difference tmp/comp.png
convert tmp/comp.png -auto-level tmp/comp-auto.png
montage -geometry +4+4 -tile 7x1 "$1" tmp/diff.png tmp/fuzzy.png tmp/fuzzier.png tmp/comp.png tmp/comp-auto.png "$2" tmp/final.png
mogrify -magnify tmp/final.png
cp tmp/final.png "tmp/diffs/$(basename "$1")"
# display tmp/final.png