pnmpsnr: compare the same images failed (#969479)

This commit is contained in:
Petr Hracek 2013-06-05 10:28:08 +02:00
parent c51f2c86eb
commit 8f323cacdb
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,23 @@
diff --git a/analyzer/pnmpsnr.c b/analyzer/pnmpsnr.c
index ce2708b..b04316c 100644
--- a/analyzer/pnmpsnr.c
+++ b/analyzer/pnmpsnr.c
@@ -55,14 +55,14 @@ validateInput(struct pam const pam1,
"maxval of one of them.",
(unsigned int) pam1.maxval, (unsigned int) pam2.maxval);
- if (streq(pam1.tuple_type, pam2.tuple_type))
+ if (!streq(pam1.tuple_type, pam2.tuple_type))
pm_error("images are not of the same type. The tuple types are "
"'%s' and '%s', respectively.",
pam1.tuple_type, pam2.tuple_type);
- if (streq(pam1.tuple_type, PAM_PBM_TUPLETYPE) &&
- streq(pam1.tuple_type, PAM_PGM_TUPLETYPE) &&
- streq(pam1.tuple_type, PAM_PPM_TUPLETYPE))
+ if (!streq(pam1.tuple_type, PAM_PBM_TUPLETYPE) &&
+ !streq(pam1.tuple_type, PAM_PGM_TUPLETYPE) &&
+ !streq(pam1.tuple_type, PAM_PPM_TUPLETYPE))
pm_error("Images are not of a PNM type. Tuple type is '%s'",
pam1.tuple_type);
}

View File

@ -1,7 +1,7 @@
Summary: A library for handling different graphics file formats Summary: A library for handling different graphics file formats
Name: netpbm Name: netpbm
Version: 10.61.02 Version: 10.61.02
Release: 3%{?dist} Release: 4%{?dist}
# See copyright_summary for details # See copyright_summary for details
License: BSD and GPLv2 and IJG and MIT and Public Domain License: BSD and GPLv2 and IJG and MIT and Public Domain
Group: System Environment/Libraries Group: System Environment/Libraries
@ -35,6 +35,7 @@ Patch24: netpbm-ppmtopict.patch
Patch25: netpbm-pnmtopclxl.patch Patch25: netpbm-pnmtopclxl.patch
Patch26: netpbm-man-repeated.patch Patch26: netpbm-man-repeated.patch
Patch27: netpbm-multipage-pam.patch Patch27: netpbm-multipage-pam.patch
Patch28: netpbm-compare-same-images.patch
BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex
BuildRequires: libX11-devel, python, jasper-devel, libxml2-devel BuildRequires: libX11-devel, python, jasper-devel, libxml2-devel
@ -110,6 +111,7 @@ netpbm-doc. You'll also need to install the netpbm-progs package.
%patch25 -p1 -b .pnmtopclxl %patch25 -p1 -b .pnmtopclxl
%patch26 -p1 -b .man-repeated %patch26 -p1 -b .man-repeated
%patch27 -p1 -b .multipage-pam %patch27 -p1 -b .multipage-pam
%patch28 -p1 -b .compare-same-images
sed -i 's/STRIPFLAG = -s/STRIPFLAG =/g' config.mk.in sed -i 's/STRIPFLAG = -s/STRIPFLAG =/g' config.mk.in
rm -rf converter/other/jpeg2000/libjasper/ rm -rf converter/other/jpeg2000/libjasper/
@ -260,6 +262,9 @@ rm -rf $RPM_BUILD_ROOT
%doc userguide/* %doc userguide/*
%changelog %changelog
* Wed Jun 05 2013 Petr Hracek <phracek@redhat.com> - 10.61.02-4
- pnmpsnr: compare the same images failed (#969479)
* Tue May 28 2013 Petr Hracek <phracek@redhat.com> - 10.61.02-3 * Tue May 28 2013 Petr Hracek <phracek@redhat.com> - 10.61.02-3
- pnmtops: Multi-page PAM files correction (#833546) - pnmtops: Multi-page PAM files correction (#833546)