~kolmis/cairoplot/speedup

« back to all changes in this revision

Viewing changes to trunk/testscripts/compare.sh

  • Committer: Karel Kolman
  • Date: 2009-10-07 09:14:28 UTC
  • Revision ID: kolmis@gmail.com-20091007091428-jewvzsg8t6fs2y3x
compare.sh - script to compare PNG outputs from seriestest.py between two versions
(uses imagemagick and perceptualdiff)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
if [ $# -ne 3 ]
 
4
then
 
5
    echo "Compare .png files in two directories"
 
6
    echo "Usage: ./compare.sh path1 path2 diffdir"
 
7
    echo "Example: ./compare.sh . ../other ./diff"
 
8
    exit
 
9
fi
 
10
 
 
11
for dir in $1 $2
 
12
do
 
13
  for i in $dir/*.png
 
14
  do
 
15
    convert $i $i.tiff
 
16
  done
 
17
done
 
18
 
 
19
for i in `(cd $1; ls *.tiff)`
 
20
do
 
21
    perceptualdiff $1/$i $2/$i -output $3/$i.ppm
 
22
done