about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-05-11 20:32:20 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-05-11 20:32:20 +0000
commit14dcfc9cb9a37078e7362699690188eed276e570 (patch)
tree72fbc1e780942e2feaab5ed26f209622c366806f
parentd54dcb5ce98f627d4dcdf266c55e0310cebdb68d (diff)
downloadnetpbm-mirror-14dcfc9cb9a37078e7362699690188eed276e570.tar.gz
netpbm-mirror-14dcfc9cb9a37078e7362699690188eed276e570.tar.xz
netpbm-mirror-14dcfc9cb9a37078e7362699690188eed276e570.zip
Fix computation of PNG color type
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1903 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-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