about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--converter/other/pngtopam.c2
-rw-r--r--doc/HISTORY16
-rw-r--r--generator/ppmpat.c4
-rw-r--r--version.mk2
4 files changed, 17 insertions, 7 deletions
diff --git a/converter/other/pngtopam.c b/converter/other/pngtopam.c
index 160ad667..d748c327 100644
--- a/converter/other/pngtopam.c
+++ b/converter/other/pngtopam.c
@@ -1131,7 +1131,7 @@ determineOutputType(struct pngx *       const pngxP,
                 *depthP = 4;
                 strcpy(tupleType, "RGB_ALPHA");
             } else {
-                *depthP = 1;
+                *depthP = 2;
                 strcpy(tupleType, "GRAYSCALE_ALPHA");
             }
         } else {
diff --git a/doc/HISTORY b/doc/HISTORY
index feefe9e6..d3eca9ff 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,11 +4,24 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+12.12.14 BJH  Release 10.60.05
+
+              pngtopam -alphapam with grayscale input: fix bug: generates
+              invalid output: tuple type GRAYSCALE_ALPHA, but depth 1.  Depth
+              should be 2.  Always broken (pngtopam was created in 
+              Netpbm 10.44 (September 2008).
+              
+              ppmpat: Fix bug: wrong output with -poles.  Broken in 10.47
+              (June 2009).
+
 12.12.04 BJH  Release 10.60.04
 
               pamtotiff: fix bug: XRESOLUTION, YRESOLUTION, and RESOLUTIONUNIT
               not allowed in -tags.  Broken at least since 10.35.
 
+              pnmpsnr: fix crash when invoked (invalidly) with only one
+              argument.  Always broken.
+
               pnmmontage: fix totally wrong output.  Broken in 10.44
               (August 2008).
 
@@ -16,9 +29,6 @@ CHANGE HISTORY
               output image.  Always broken (program was new in 9.10 (January
               2001).
 
-              pnmpsnr: fix crash when invoked (invalidly) with only one
-              argument.  Always broken.
-
               pbmpscale, pgmhist, pampick, pamtompfont: fix wild pointer
               in command line parsing.  Bug has always been there in 
               pampick, pamtompfont, since 10.50 (March 2010) in pbmpscale,
diff --git a/generator/ppmpat.c b/generator/ppmpat.c
index c4ceb797..de1278f9 100644
--- a/generator/ppmpat.c
+++ b/generator/ppmpat.c
@@ -828,8 +828,8 @@ poles(pixel **     const pixels,
             dist1 = dist2 = (SQR((double)cols) + SQR((double)rows));
             for (i = 0; i < poleCt; ++i) {
                 double const newdist =
-                    (double)(col - xs[i]) * (col - xs[i]) +
-                    (double)(row - ys[i]) * (row - ys[i]);
+                    (double)((int)col - xs[i]) * ((int)col - xs[i]) +
+                    (double)((int)row - ys[i]) * ((int)row - ys[i]);
                 if (newdist < dist1) {
                     dist2  = dist1;
                     color2 = color1;
diff --git a/version.mk b/version.mk
index 8e12db7d..5ec00429 100644
--- a/version.mk
+++ b/version.mk
@@ -1,4 +1,4 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 60
-NETPBM_POINT_RELEASE = 4
+NETPBM_POINT_RELEASE = 5