diff options
-rw-r--r-- | converter/other/pngtopam.c | 2 | ||||
-rw-r--r-- | converter/pbm/cmuwmtopbm.c | 2 | ||||
-rw-r--r-- | converter/ppm/leaftoppm.c | 2 | ||||
-rw-r--r-- | doc/HISTORY | 18 | ||||
-rw-r--r-- | generator/ppmpat.c | 4 | ||||
-rw-r--r-- | version.mk | 2 |
6 files changed, 23 insertions, 7 deletions
diff --git a/converter/other/pngtopam.c b/converter/other/pngtopam.c index ee46ca0e..89ac100a 100644 --- a/converter/other/pngtopam.c +++ b/converter/other/pngtopam.c @@ -924,7 +924,7 @@ determineOutputType(png_info * const pngInfoP, *depthP = 4; strcpy(tupleType, "RGB_ALPHA"); } else { - *depthP = 1; + *depthP = 2; strcpy(tupleType, "GRAYSCALE_ALPHA"); } } else { diff --git a/converter/pbm/cmuwmtopbm.c b/converter/pbm/cmuwmtopbm.c index ce59491e..eabff40c 100644 --- a/converter/pbm/cmuwmtopbm.c +++ b/converter/pbm/cmuwmtopbm.c @@ -40,7 +40,7 @@ readCmuwmHeader(FILE * const ifP, rc = pm_readbiglong(ifP, &l); if (rc == -1 ) pm_error(initReadError); - if (l != CMUWM_MAGIC) + if ((uint32_t)l != CMUWM_MAGIC) pm_error("bad magic number in CMU window manager file"); rc = pm_readbiglong(ifP, &l); if (rc == -1) diff --git a/converter/ppm/leaftoppm.c b/converter/ppm/leaftoppm.c index bda44494..61c19c1e 100644 --- a/converter/ppm/leaftoppm.c +++ b/converter/ppm/leaftoppm.c @@ -36,7 +36,7 @@ leaf_init(FILE * const fp, long magic; pm_readbiglong(fp, &magic); - if (magic != 0x894f5053) + if ((uint32_t)magic != 0x894f5053) pm_error("Bad magic number. First 4 bytes should be " "0x894f5053 but are instead 0x%08x", (unsigned)magic); diff --git a/doc/HISTORY b/doc/HISTORY index 5a3ac0ec..1af1a61c 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,22 @@ Netpbm. CHANGE HISTORY -------------- +13.02.20 BJH Release 10.47.43 + + 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). + + leaftoppm: fix incorrect determination of whether input is + Interleaf on 64 bit systems. Always broken. + + cmuwmtopbm: fix incorrect determination of whether input is + a CMU window manager bitmap on 64 bit systems. Always broken. + 12.12.04 BJH Release 10.47.42 pamtotiff: fix bug: XRESOLUTION, YRESOLUTION, and RESOLUTIONUNIT @@ -22,7 +38,7 @@ CHANGE HISTORY 12.10.03 BJH Release 10.47.41 pamgauss: Fix bug: erroneously says -maxval is too big. - Always broken (Pamgauss was added in 10.23 (July 2004). + Always broken (Pamgauss was added in 10.23 (July 2004)). 12.08.20 BJH Release 10.47.40 diff --git a/generator/ppmpat.c b/generator/ppmpat.c index 82acafae..09d90815 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 02fe66bb..9b5461d2 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 47 -NETPBM_POINT_RELEASE = 42 +NETPBM_POINT_RELEASE = 43 |