From: glennrp Date: Sat, 25 Aug 2012 17:36:19 +0000 (+0000) Subject: Fix Q32 read of 16-bit grayscale PNGs X-Git-Tag: 7.0.1-0~5060 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32340ffa74550819f755f966e397ed58bbccd8e5;p=imagemagick Fix Q32 read of 16-bit grayscale PNGs --- diff --git a/coders/png.c b/coders/png.c index c561e59f2..28b4c590e 100644 --- a/coders/png.c +++ b/coders/png.c @@ -2810,7 +2810,8 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, " image->colorspace=%d",(int) image->colorspace); if (((int) ping_color_type == PNG_COLOR_TYPE_PALETTE) || - ((int) ping_color_type == PNG_COLOR_TYPE_GRAY)) + ((int) ping_bit_depth < 16 && + (int) ping_color_type == PNG_COLOR_TYPE_GRAY)) { size_t one;