about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2021-05-15 15:52:12 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2021-05-15 15:52:12 +0000
commit8a71e8766401f382f6bf3f0a9baad7b459f369b6 (patch)
tree6a077e0e910e779d01ddeb14d42b3d419586791d
parent586378995417d8570072ec28dfb25218c34f5d35 (diff)
downloadnetpbm-mirror-8a71e8766401f382f6bf3f0a9baad7b459f369b6.tar.gz
netpbm-mirror-8a71e8766401f382f6bf3f0a9baad7b459f369b6.tar.xz
netpbm-mirror-8a71e8766401f382f6bf3f0a9baad7b459f369b6.zip
Fix compressor rejection of depth less than 8 with transparency
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4105 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/other/pamtopng.c3
-rw-r--r--doc/HISTORY4
2 files changed, 6 insertions, 1 deletions
diff --git a/converter/other/pamtopng.c b/converter/other/pamtopng.c
index ae9e14ea..327a2b1f 100644
--- a/converter/other/pamtopng.c
+++ b/converter/other/pamtopng.c
@@ -795,7 +795,8 @@ pngBitDepth(unsigned int const pnmBitDepth,
     unsigned int retval;
 
     if ((pngColorType == PNG_COLOR_TYPE_RGB ||
-         pngColorType == PNG_COLOR_TYPE_RGB_ALPHA) &&
+         pngColorType == PNG_COLOR_TYPE_RGB_ALPHA ||
+         pngColorType == PNG_COLOR_TYPE_GRAY_ALPHA) &&
         pnmBitDepth < 8) {
 
         retval = 8;
diff --git a/doc/HISTORY b/doc/HISTORY
index e0d60db2..bb810280 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -11,6 +11,10 @@ not yet  BJH  Release 10.95.00
               Netpbm 10.71 (June 2015)).  Thanks Karol Kosek
               <krkk@krkk.ct8.pl>.
 
+              pamtopng: Fix failure with GRAYSCALE_ALPHA images with maxval
+              less than 255.  Always broken (pamtopng was new in Netpbm 10.71
+              (June 2015)).  Thanks Karol Kosek <krkk@krkk.ct8.pl>.
+              
               pamtopng: Fix: treats all tuple types that start with BLA as
               BLACKANDWHITE.  Always broken (pamtopng was new in Netpbm 10.71
               (June 2015)).