diff options
-rw-r--r-- | doc/HISTORY | 13 | ||||
-rw-r--r-- | editor/pnmnorm.c | 2 | ||||
-rw-r--r-- | other/pamdepth.c | 11 | ||||
-rw-r--r-- | version.mk | 2 |
4 files changed, 23 insertions, 5 deletions
diff --git a/doc/HISTORY b/doc/HISTORY index 3ef64245..a60cd79c 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,9 +4,18 @@ Netpbm. CHANGE HISTORY -------------- +20.08.29 BJH Release 10.91.02 + + pamdepth: fix bug: doesn't work on PAM with black and white + tuple type. + + pnmnorm: Fix bug: output too dark when -bpercent and -wpercent + indicate overlapping values. Broken since Netpbm 10.43 (June + 2008). + 20.07.21 BJH Release 10.91.01 - pbmtext: fix double-free crash with -font . Introduced in + pbmtext: Fix double-free crash with -font . Introduced in Netpbm 10.91 (June 2020). pcdovtoppm: Fix some garbage from the conversion from csh to sh @@ -21,7 +30,7 @@ CHANGE HISTORY pamstereogram: Add -tileable. Thanks Scott Pakin. - pcdovtoppm: implement -version, -plain, and -quiet. + pcdovtoppm: Implement -version, -plain, and -quiet. pcdovtoppm: more secure temporary file handling. diff --git a/editor/pnmnorm.c b/editor/pnmnorm.c index e0fe0e35..20d7eb04 100644 --- a/editor/pnmnorm.c +++ b/editor/pnmnorm.c @@ -487,7 +487,7 @@ disOverlap(xelval const reqBvalue, } } else { /* Both ends are free; use the point halfway between them. */ - xelval const midPoint = (reqWvalue + reqBvalue + maxval/2)/2; + xelval const midPoint = (reqWvalue + reqBvalue)/2; *nonOlapBvalueP = MIN(midPoint, maxval-1); *nonOlapWvalueP = *nonOlapBvalueP + 1; } diff --git a/other/pamdepth.c b/other/pamdepth.c index 71dae9d8..96613d07 100644 --- a/other/pamdepth.c +++ b/other/pamdepth.c @@ -13,6 +13,7 @@ #include "pm_c_util.h" #include "mallocvar.h" +#include "nstring.h" #include "shhopt.h" #include "pam.h" @@ -157,11 +158,19 @@ main(int argc, const char * argv[]) { outpam.maxval = cmdline.newMaxval; if (PNM_FORMAT_TYPE(inpam.format) == PBM_TYPE) { - pm_message( "promoting from PBM to PGM" ); outpam.format = PGM_TYPE; } else outpam.format = inpam.format; + if (streq(inpam.tuple_type, PAM_PBM_TUPLETYPE)) { + pm_message("promoting from black and white to grayscale"); + strcpy(outpam.tuple_type, PAM_PGM_TUPLETYPE); + } else if (streq(inpam.tuple_type, PAM_PBM_ALPHA_TUPLETYPE)) { + pm_message("promoting from black and white to grayscale"); + strcpy(outpam.tuple_type, PAM_PGM_ALPHA_TUPLETYPE); + } else + strcpy(outpam.tuple_type, inpam.tuple_type); + pnm_writepaminit(&outpam); transformRaster(&inpam, &outpam); diff --git a/version.mk b/version.mk index e1969226..3d6a805e 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 91 -NETPBM_POINT_RELEASE = 1 +NETPBM_POINT_RELEASE = 2 |