From ae68d3d3190f4d259442eb8b98362a43b49d47b8 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 17 Dec 2017 10:08:40 -0500 Subject: [PATCH] Return non-linear gray for gray50 --- MagickCore/property.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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) -- 2.50.1