about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--converter/other/pnmtopng.c2
-rw-r--r--doc/HISTORY4
2 files changed, 5 insertions, 1 deletions
diff --git a/converter/other/pnmtopng.c b/converter/other/pnmtopng.c
index 4e374939..2feced6a 100644
--- a/converter/other/pnmtopng.c
+++ b/converter/other/pnmtopng.c
@@ -2418,7 +2418,7 @@ doIhdrChunk(struct pngx * const pngxP,
     else
         colorType = PNG_COLOR_TYPE_GRAY;
 
-    if (alpha && pngx_colorType(pngxP) != PNG_COLOR_TYPE_PALETTE)
+    if (alpha && colorType != PNG_COLOR_TYPE_PALETTE)
         colorType |= PNG_COLOR_MASK_ALPHA;
 
     pngx_setIhdr(pngxP, width, height, depth, colorType, 0, 0, 0);
diff --git a/doc/HISTORY b/doc/HISTORY
index 86779002..704e0593 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -12,6 +12,10 @@ not yet  BJH  Release 10.63.00
               Perl programs: make them shell programs that reinvoke themselves
               as perl so we can get the Perl interpreter from the PATH.
 
+              pnmtopng: fix bug: incorrect output when output should have
+              an alpha mask.  Broken in 10.55 (June 2011).  Thanks
+              Ludolf Holzheid (lholzheid@bihl-wiedemann.de).
+
               pnmtopng: fix bug: output bigger than it needs to be when the
               input is a color format image that contains only gray.  Broken
               since at least 10.26 (May 2001), but after 10.18 (September