Fixed a bug in the comparison algorithm that made all images of the same size look the same.
2 files changed, 3 insertions(+), 3 deletions(-)

M metric.go
M pdiff/main.go
M metric.go +2 -2
@@ 137,13 137,12 @@ func Yee_Compare(args *CompareArgs) bool
 		return false
 	}
 
-	dim := w * h
 	identical := true
 	for ix := 0; ix < w; ix++ {
 		for iy := 0; iy < h; iy++ {
 			ca := args.ImgA.At(ix, iy).(color.RGBA)
 			cb := args.ImgB.At(ix, iy).(color.RGBA)
-			if ca.R != cb.R && ca.G != cb.G && ca.B != cb.B && ca.A != cb.A {
+			if ca.R != cb.R || ca.G != cb.G || ca.B != cb.B || ca.A != cb.A {
 				identical = false
 				break
 			}

          
@@ 154,6 153,7 @@ func Yee_Compare(args *CompareArgs) bool
 		return true
 	}
 
+	dim := w * h
 	// assuming colorspaces are in Adobe RGB (1998) convert to XYZ
 	aX := make([]float64, dim)
 	aY := make([]float64, dim)

          
M pdiff/main.go +1 -1
@@ 25,7 25,7 @@ import (
 	"flag"
 	"fmt"
 	"os"
-	pdiff "hg.germane-software.com/perceptualdiff.hg"
+	pdiff "perceptualdiff"
 )
 
 const copyright = `PerceptualDiff Go version 1.0.0