about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-02-13 18:16:21 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-02-13 18:16:21 +0000
commitedd488e6e6220bad9cd1319bcbac2c50262e35ea (patch)
treeba64a53afd9a69be2b05cf0eb4c59c3e8118bc10
parentad09f3039be71150e9a27191014acb9f055c4cb4 (diff)
downloadnetpbm-mirror-edd488e6e6220bad9cd1319bcbac2c50262e35ea.tar.gz
netpbm-mirror-edd488e6e6220bad9cd1319bcbac2c50262e35ea.tar.xz
netpbm-mirror-edd488e6e6220bad9cd1319bcbac2c50262e35ea.zip
Release 10.86.31
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@4274 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/ppm/ppmtoapplevol.c6
-rw-r--r--doc/HISTORY14
-rw-r--r--lib/libpamcolor.c2
-rw-r--r--version.mk2
4 files changed, 21 insertions, 3 deletions
diff --git a/converter/ppm/ppmtoapplevol.c b/converter/ppm/ppmtoapplevol.c
index e1c7f2dc..eb4b6b2a 100644
--- a/converter/ppm/ppmtoapplevol.c
+++ b/converter/ppm/ppmtoapplevol.c
@@ -68,6 +68,10 @@ main (int argc, const char * argv[]) {
     if (rows != 12)
         pm_error("Input image must be 12 rows tall.  Yours is %u", rows);
 
+    if (cols > 255)
+        pm_error("Input image must not be more than 255 columns wide."
+                 "  Yours is %u", cols);
+
     writeHeader(cols, stdout);
 
     pixelrow = ppm_allocrow(cols);
@@ -75,7 +79,7 @@ main (int argc, const char * argv[]) {
     for (row = 0; row < rows; row++) {
         unsigned int col;
         
-        ppm_readppmrow(stdin, pixelrow, cols, maxval, format);
+        ppm_readppmrow(ifP, pixelrow, cols, maxval, format);
 
         for (col = 0; col < cols; ++col) {
             unsigned int const maxval15Value =
diff --git a/doc/HISTORY b/doc/HISTORY
index 4c41843c..1c911ad4 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,20 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+22.02.13 BJH  Release 10.86.31
+
+              libnetpbm, various programs: fix bug: bogus warning that a color
+              specified on command line cannot be represented exactly with the
+              maxval being used.  Introduced in Netpbm 10.83 (June 2018).
+
+              ppmtoapplevol: Fix bug: reads from Standard Input even when you
+              specify the input file argument.  Always broken.  (ppmtoapplevol
+              was new in Netpbm 10.54 (March 2011).
+
+              ppmtoapplevol: Fix bug: produces garbage with input image wider
+              than 255.  Always broken.  (ppmtoapplevol was new in Netpbm
+              10.54 (March 2011).
+
 22.01.25 BJH  Release 10.86.30
 
               pgmabel: Fix incorrect output.  Always broken.  (Program was
diff --git a/lib/libpamcolor.c b/lib/libpamcolor.c
index e1a24c66..39ff793b 100644
--- a/lib/libpamcolor.c
+++ b/lib/libpamcolor.c
@@ -338,7 +338,7 @@ warnIfNotExact(const char * const colorname,
 
     float const epsilon = 1.0/65536.0;
 
-    if (fabs((float)(rounded[plane] / maxval) - exact[plane]) > epsilon) {
+    if (fabs(((float)rounded[plane] / maxval) - exact[plane]) > epsilon) {
         pm_message("WARNING: Component %u of color '%s' is %f, "
                    "which cannot be represented precisely with maxval %lu.  "
                    "Approximating as %lu.",
diff --git a/version.mk b/version.mk
index c3491542..986afc5b 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 86
-NETPBM_POINT_RELEASE = 30
+NETPBM_POINT_RELEASE = 31