From 70e68a844517efda3094dc170a8f54affc9c82bc Mon Sep 17 00:00:00 2001 From: glennrp Date: Fri, 1 Apr 2011 22:51:14 +0000 Subject: [PATCH] Make the png encoder treat incoming image depth as 8 if it is less than 8. --- coders/png.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coders/png.c b/coders/png.c index ac3ce4e32..67f187df9 100644 --- a/coders/png.c +++ b/coders/png.c @@ -7092,6 +7092,8 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, } #endif + if (image->depth < 8) + image->depth=8; #if (MAGICKCORE_QUANTUM_DEPTH > 16) /* PNG does not handle depths greater than 16 so reduce it even -- 2.40.0