From: Cristy Date: Sun, 17 Dec 2017 15:08:40 +0000 (-0500) Subject: Return non-linear gray for gray50 X-Git-Tag: 7.0.7-16~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae68d3d3190f4d259442eb8b98362a43b49d47b8;p=imagemagick Return non-linear gray for gray50 --- diff --git a/MagickCore/property.c b/MagickCore/property.c index a36b8841b..72eb5a858 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -2801,10 +2801,20 @@ MagickExport const char *GetMagickProperty(ImageInfo *image_info, } if (LocaleCompare("colorspace",property) == 0) { + ColorspaceType + colorspace; + + ImageType + type; + + colorspace=image->colorspace; + type=IdentifyImageType(image,exception); + if ((type == BilevelType) || (type == GrayscaleType) || + (type == GrayscaleAlphaType)) + colorspace=GRAYColorspace; WarnNoImageReturn("\"%%[%s]\"",property); - /* FUTURE: return actual colorspace - no 'gray' stuff */ string=CommandOptionToMnemonic(MagickColorspaceOptions,(ssize_t) - image->colorspace); + colorspace); break; } if (LocaleCompare("compose",property) == 0)