summaryrefslogtreecommitdiff
path: root/test/pdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-12-14 00:42:52 -0800
committerCarl Worth <cworth@cworth.org>2006-12-14 07:58:00 -0800
commit358645d6eb68b4eaf79159e7aefa01bca4cb0acf (patch)
tree6af1999fba054b9b89e3e25f864fd405973ed727 /test/pdiff
parent4438fb6dca1b4b6c0a30d66508339c3997ee94a4 (diff)
pdiff: Rip out unused ImgDiff code, (dropping -output option)
Diffstat (limited to 'test/pdiff')
-rw-r--r--test/pdiff/CompareArgs.cpp7
-rw-r--r--test/pdiff/CompareArgs.h1
-rw-r--r--test/pdiff/Metric.cpp11
-rw-r--r--test/pdiff/PerceptualDiff.cpp14
-rw-r--r--test/pdiff/README.txt4
5 files changed, 2 insertions, 35 deletions
diff --git a/test/pdiff/CompareArgs.cpp b/test/pdiff/CompareArgs.cpp
index 716f79e3..0f9cb0f6 100644
--- a/test/pdiff/CompareArgs.cpp
+++ b/test/pdiff/CompareArgs.cpp
@@ -34,7 +34,6 @@ static const char *usage =
\t-threshold p : #pixels p below which differences are ignored\n\
\t-gamma g : Value to convert rgb into linear space (default 2.2)\n\
\t-luminance l : White luminance (default 100.0 cdm^-2)\n\
-\t-output o.ppm : Write difference to the file o.ppm\n\
\n\
\n Note: Input files can also be in the PNG format\
\n";
@@ -43,7 +42,6 @@ CompareArgs::CompareArgs()
{
ImgA = NULL;
ImgB = NULL;
- ImgDiff = NULL;
Verbose = false;
FieldOfView = 45.0f;
Gamma = 2.2f;
@@ -55,7 +53,6 @@ CompareArgs::~CompareArgs()
{
if (ImgA) delete ImgA;
if (ImgB) delete ImgB;
- if (ImgDiff) delete ImgDiff;
}
bool CompareArgs::Parse_Args(int argc, char **argv)
@@ -110,10 +107,6 @@ bool CompareArgs::Parse_Args(int argc, char **argv)
if (i + 1 < argc) {
Luminance = (float) atof(argv[i + 1]);
}
- }else if (strstr(argv[i], "-output")) {
- if (i + 1 < argc) {
- ImgDiff = new RGBAImage(ImgA->Get_Width(), ImgA->Get_Height(), argv[i+1]);
- }
}
}
} /* i */
diff --git a/test/pdiff/CompareArgs.h b/test/pdiff/CompareArgs.h
index 85f01743..1cab0da0 100644
--- a/test/pdiff/CompareArgs.h
+++ b/test/pdiff/CompareArgs.h
@@ -33,7 +33,6 @@ public:
RGBAImage *ImgA; /* Image A */
RGBAImage *ImgB; /* Image B */
- RGBAImage *ImgDiff; /* Diff image */
bool Verbose; /* Print lots of text or not */
float FieldOfView; /* Field of view in degrees */
float Gamma; /* The gamma to convert to linear color space */
diff --git a/test/pdiff/Metric.cpp b/test/pdiff/Metric.cpp
index c1a8b997..44a704df 100644
--- a/test/pdiff/Metric.cpp
+++ b/test/pdiff/Metric.cpp
@@ -274,17 +274,6 @@ int Yee_Compare_Images(RGBAImage *image_a,
}
if (!pass)
pixels_failed++;
-#if IMAGE_DIFF_ENABLED
- if (!pass) {
- if (args.ImgDiff) {
- args.ImgDiff->Set(255, 0, 0, 255, index);
- }
- } else {
- if (args.ImgDiff) {
- args.ImgDiff->Set(0, 0, 0, 255, index);
- }
- }
-#endif
}
}
diff --git a/test/pdiff/PerceptualDiff.cpp b/test/pdiff/PerceptualDiff.cpp
index 6e098ed9..3affa16d 100644
--- a/test/pdiff/PerceptualDiff.cpp
+++ b/test/pdiff/PerceptualDiff.cpp
@@ -62,20 +62,6 @@ static bool Yee_Compare(CompareArgs &args)
args.ErrorStr = "Images are visibly different\n";
args.ErrorStr += different;
- if (args.ImgDiff) {
-#if IMAGE_DIFF_CODE_ENABLED
- if (args.ImgDiff->WritePPM()) {
- args.ErrorStr += "Wrote difference image to ";
- args.ErrorStr+= args.ImgDiff->Get_Name();
- args.ErrorStr += "\n";
- } else {
- args.ErrorStr += "Could not write difference image to ";
- args.ErrorStr+= args.ImgDiff->Get_Name();
- args.ErrorStr += "\n";
- }
-#endif
- args.ErrorStr += "Generation of image \"difference\" is currently disabled\n";
- }
return false;
}
diff --git a/test/pdiff/README.txt b/test/pdiff/README.txt
index a873f3c0..922ddafb 100644
--- a/test/pdiff/README.txt
+++ b/test/pdiff/README.txt
@@ -36,10 +36,10 @@ a theatre has a field of view of around 25 degrees. Back row has a field of
-gamma g : The gamma to use to convert to RGB linear space. Default is 2.2
-luminance l: The luminance of the display the observer is seeing. Default
is 100 candela per meter squared
--output foo.ppm : Saves the difference image to foo.ppm
Credits
Hector Yee, project administrator and originator - hectorgon.blogspot.com
Scott Corley, for png file IO code
-Mick Weiss, Linux build and release & QA \ No newline at end of file
+Mick Weiss, Linux build and release & QA
+Carl Worth, Rewrite as library, depend on cairo, and port to C \ No newline at end of file