From a96117f52c1b80ea98cd652c9174e1f2cb42dfcd Mon Sep 17 00:00:00 2001 From: John Bowler Date: Sat, 8 Jan 2011 14:41:25 -0600 Subject: [PATCH] [devel] Ensure that png_rgb_to_gray ignores palette mapped images. --- pngrtran.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pngrtran.c b/pngrtran.c index 7da7886f6..7c1f8a18d 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -2427,7 +2427,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) png_debug(1, "in png_do_rgb_to_gray"); - if ( + if (!(row_info->color_type & PNG_COLOR_MASK_PALETTE) && (row_info->color_type & PNG_COLOR_MASK_COLOR)) { png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff;