File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ This directory contains facilities that allow to highlight changes
2+ between two images.
3+
4+ Prerequisites
5+ -------------
6+
7+ ImageMagick - http://www.imagemagick.org/script/download.php
8+
9+
10+ Installation
11+ ------------
12+
13+ Copy the file imgdiff into a directory that is in your PATH
14+
15+
16+ Usage
17+ -----
18+
19+ Activate imgdiff in your repository
20+
21+ a. Define a custom diff driver:
22+
23+ $ git config diff.imgdiff.command imgdiff
24+
25+ b. Use the custom driver for your images, i.e. put
26+ a line like this in your .git/info/attributes:
27+
28+ *.png diff=imgdiff
29+
30+ Since this uses ImageMagick behind the scenes, all image formats
31+ are supported that your ImageMagick installation supports.
32+
33+ You can also run the program from the command line like this:
34+
35+ $ imgdiff pictureold.png picturenew.png
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ if test $# = 7; then
4+ of=" $2 "
5+ nf=" $5 "
6+ echo " Image $1 changed"
7+ else
8+ of=" $1 "
9+ nf=" $2 "
10+ echo " Images $of and $nf differ"
11+ fi
12+
13+ d=$TMP /imgdiff$$ .png
14+
15+ trap ' rm -f "$d"' 0 1 2 15
16+
17+ compare " $of " " $nf " " $d " &&
18+ imdisplay " $d "
You can’t perform that action at this time.
0 commit comments