mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-03 03:30:17 +01:00
pdiff: Rip out unused ImgDiff code, (dropping -output option)
This commit is contained in:
parent
4438fb6dca
commit
358645d6eb
5 changed files with 2 additions and 35 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Mick Weiss, Linux build and release & QA
|
||||
Carl Worth, Rewrite as library, depend on cairo, and port to C
|
||||
Loading…
Add table
Reference in a new issue