From: glennrp Date: Fri, 1 Apr 2011 22:51:14 +0000 (+0000) Subject: Make the png encoder treat incoming image depth as 8 if it is less than 8. X-Git-Tag: 7.0.1-0~7790 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70e68a844517efda3094dc170a8f54affc9c82bc;p=imagemagick Make the png encoder treat incoming image depth as 8 if it is less than 8. --- 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