From d2fc5ad51b1cc493e62efe7ccaaf9ef083faeb1a Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 2 Apr 2008 05:48:18 +0000 Subject: Fix resolution of conflicting -wpercent and -wvalue git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@610 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- doc/HISTORY | 2 ++ editor/pnmnorm.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/HISTORY b/doc/HISTORY index de7c8b1e..ca8504bc 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -8,6 +8,8 @@ not yet BJH Release 10.43.00 pnmnorm: fix -colorvalue, -saturation, -keephues options. + pnmnorm: fix resolution of conflicting -wpercent and -wvalue. + Build: make it work with Gcc 4.3 and -sse. 08.03.26 BJH Release 10.42.00 diff --git a/editor/pnmnorm.c b/editor/pnmnorm.c index 9048ee04..8a4bb351 100644 --- a/editor/pnmnorm.c +++ b/editor/pnmnorm.c @@ -403,7 +403,7 @@ computeEndValues(FILE * const ifp, computeTopPercentile(hist, maxval, cols*rows, cmdline.wpercent, &percentWvalue); if (cmdline.wvalueSpec) - unlimitedWvalue = MIN(percentWvalue, cmdline.wvalue); + unlimitedWvalue = MAX(percentWvalue, cmdline.wvalue); else unlimitedWvalue = percentWvalue; } -- cgit 1.4.1