summaryrefslogtreecommitdiff
path: root/graphics/pdiff/patches/patch-aa
blob: f44585b0da1015bcef25870838f9bcca20a3fd4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$NetBSD: patch-aa,v 1.3 2010/06/13 22:44:40 wiz Exp $

Not compatible with png-1.4.

--- CompareArgs.cpp.orig	2007-03-16 06:17:17.000000000 +0000
+++ CompareArgs.cpp
@@ -35,8 +35,6 @@ static const char *usage =
 \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";
 
 CompareArgs::CompareArgs()
@@ -69,26 +67,18 @@ bool CompareArgs::Parse_Args(int argc, c
 		if (i == 1) {
 			ImgA = RGBAImage::ReadTiff(argv[1]);
 			if (!ImgA) {
-				ImgA = RGBAImage::ReadPNG(argv[1]);
-				if (!ImgA)
-				{
 					ErrorStr = "FAIL: Cannot open ";
 					ErrorStr += argv[1];
 					ErrorStr += "\n";
 					return false;
-				}
 			}
 		} else if (i == 2) {			
 			ImgB = RGBAImage::ReadTiff(argv[2]);
 			if (!ImgB) {
-				ImgB = RGBAImage::ReadPNG(argv[2]);
-				if (!ImgB)
-				{
 					ErrorStr = "FAIL: Cannot open ";
 					ErrorStr += argv[2];
 					ErrorStr += "\n";
 					return false;
-				}
 			}
 		} else {
 			if (strstr(argv[i], "-fov")) {