about summary refs log tree commit diff
path: root/converter/other/pnmtopng.c
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 /converter/other/pnmtopng.c
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
Diffstat (limited to 'converter/other/pnmtopng.c')
-rw-r--r--converter/other/pnmtopng.c2
1 files changed, 1 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);