From: glennrp Date: Mon, 14 May 2012 13:21:17 +0000 (+0000) Subject: Added a note to coders/png.c explaining that ancillary colorspace chunks X-Git-Tag: 7.0.1-0~5594 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6c5d34901e480ed05ae3d7be9b4725d6e5ea246;p=imagemagick Added a note to coders/png.c explaining that ancillary colorspace chunks are now ignored for grayscale images. --- diff --git a/coders/png.c b/coders/png.c index 2ebc89e44..37fd9efe1 100644 --- a/coders/png.c +++ b/coders/png.c @@ -2722,9 +2722,15 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, image->compression=ZipCompression; image->columns=ping_width; image->rows=ping_height; + + /* Note that the following sets image->gamma to 1.0, image->rendering_intent + to Undefined, and resets image->chromaticity, overriding any ancillary + chunk data from the PNG file. + */ if (((int) ping_color_type == PNG_COLOR_TYPE_GRAY) || ((int) ping_color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) SetImageColorspace(image,GRAYColorspace,exception); + if (((int) ping_color_type == PNG_COLOR_TYPE_PALETTE) || ((int) ping_color_type == PNG_COLOR_TYPE_GRAY)) {