aa44efb58ae3 — russes02 12 years ago
Renamed executable to pdiff; executable now imports from repo.
1 files changed, 11 insertions(+), 11 deletions(-)

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

          
@@ 39,24 39,24 @@ See the GPL page for details: http://www
 `
 
 func main() {
-	args := perceptualdiff.NewCompareArgs()
+	args := pdiff.NewCompareArgs()
 
 	if !parse_Args(args) {
 		os.Exit(-1)
 	}
 
-	passed := perceptualdiff.Yee_Compare(args)
+	passed := pdiff.Yee_Compare(args)
 
 	switch args.Result {
 	default:
 		fmt.Printf("library returned unknown result %d\n", args.Result)
-	case perceptualdiff.BINARY_IDENTICAL:
+	case pdiff.BINARY_IDENTICAL:
 		fmt.Println("images are binary identical")
-	case perceptualdiff.DIMENSION_MISMATCH:
+	case pdiff.DIMENSION_MISMATCH:
 		fmt.Println("image dimensions do not match: %v, %v", args.ImgA.Bounds(), args.ImgB.Bounds())
-	case perceptualdiff.PERCEPTUALLY_INDISTINGUISHABLE:
+	case pdiff.PERCEPTUALLY_INDISTINGUISHABLE:
 		fmt.Printf("images are perceptually indistinguishable; %d pixels differ\n", args.Differing)
-	case perceptualdiff.VISIBLY_DIFFERENT:
+	case pdiff.VISIBLY_DIFFERENT:
 		fmt.Printf("images are visually different; %d pixels differ\n", args.Differing)
 	}
 

          
@@ 69,7 69,7 @@ func main() {
 }
 
 
-func parse_Args(c *perceptualdiff.CompareArgs) bool {
+func parse_Args(c *pdiff.CompareArgs) bool {
 	flag.BoolVar(&c.Verbose, "verbose", false, "Turns on verbose mode")
 	flag.Float64Var(&c.FieldOfView, "fov", 45.0, "Field of view in degrees (0.1 to 89.9)")
 	flag.UintVar(&c.ThresholdPixels, "threshold", 100, "#pixels p below which differences are ignored")

          
@@ 93,19 93,19 @@ func parse_Args(c *perceptualdiff.Compar
 	}
 
 	var err error
-	c.ImgA, err = perceptualdiff.ReadFromFile(flag.Arg(0))
+	c.ImgA, err = pdiff.ReadFromFile(flag.Arg(0))
 	if err != nil {
 		fmt.Printf("FAIL: Cannot open %s\n", flag.Arg(0))
 		return false
 	}
-	c.ImgB, err = perceptualdiff.ReadFromFile(flag.Arg(1))
+	c.ImgB, err = pdiff.ReadFromFile(flag.Arg(1))
 	if err != nil {
 		fmt.Printf("FAIL: Cannot open %s\n", flag.Arg(1))
 		return false
 	}
 
 	if *output_file_name != "" {
-		c.ImgDiff = perceptualdiff.NewRGBAImage(c.ImgA.Bounds().Dx(), c.ImgA.Bounds().Dy(), *output_file_name)
+		c.ImgDiff = pdiff.NewRGBAImage(c.ImgA.Bounds().Dx(), c.ImgA.Bounds().Dy(), *output_file_name)
 	}
 	return true
 }