diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-04-05 20:31:34 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-04-05 20:31:34 +0000 |
commit | 796cd77a2ec197c5827d1b1c5708354e8923a414 (patch) | |
tree | fe7edb399dd3fad8c64568befbc25eed858966c8 | |
parent | d0a475ebf0370ff40793dad5b4e09b52fe8acd4e (diff) | |
download | netpbm-mirror-796cd77a2ec197c5827d1b1c5708354e8923a414.tar.gz netpbm-mirror-796cd77a2ec197c5827d1b1c5708354e8923a414.tar.xz netpbm-mirror-796cd77a2ec197c5827d1b1c5708354e8923a414.zip |
Release 10.70.01
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2451 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | converter/ppm/ppmtoarbtxt.c | 14 | ||||
-rw-r--r-- | doc/HISTORY | 7 | ||||
-rw-r--r-- | version.mk | 2 |
3 files changed, 17 insertions, 6 deletions
diff --git a/converter/ppm/ppmtoarbtxt.c b/converter/ppm/ppmtoarbtxt.c index 569f5ea2..93b3605b 100644 --- a/converter/ppm/ppmtoarbtxt.c +++ b/converter/ppm/ppmtoarbtxt.c @@ -18,6 +18,7 @@ #include <printf.h> /* Necessary for parse_printf_format() */ #endif +#include "pm_c_util.h" #include "mallocvar.h" #include "nstring.h" #include "shhopt.h" @@ -219,12 +220,15 @@ writeIcol(FILE * const ofP, SkeletonObject * const objectP, double const value) { + /* Unlike Netpbm, the output format does not have an upper limit for + maxval. Here we allow all values representable by unsigned int. + */ + struct Icdat * const icdataP = &objectP->odata.icolData; - - fprintf(ofP, icdataP->icformat, - (unsigned int) - (icdataP->icolmin - + (icdataP->icolmax - icdataP->icolmin) * value)); + unsigned int const outValue = icdataP->icolmin + + ROUNDU(((double) icdataP->icolmax - icdataP->icolmin) * value); + + fprintf(ofP, icdataP->icformat, outValue); } diff --git a/doc/HISTORY b/doc/HISTORY index f8f998d4..db9c0421 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,13 @@ Netpbm. CHANGE HISTORY -------------- +15.04.05 BJH Release 10.70.01 + + ppmtoarbtxt: fix bug: wrong output when high numbers represent + darker. Broken in Netpbm 10.69 (November 2014). + + ppmtoarbtxt: better rounding in sample values. + 15.03.29 BJH Release 10.70.00 Add st4topgm, pgmtost4. diff --git a/version.mk b/version.mk index 948133da..a377f271 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 70 -NETPBM_POINT_RELEASE = 0 +NETPBM_POINT_RELEASE = 1 |