From d3e75ead6df6f5235140c6d1ed282b6f55f632a2 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 24 Dec 2017 13:36:03 -0500 Subject: [PATCH] Rec601Luminance and Rec709Luminance intensity methods return linear gray --- MagickCore/enhance.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c index b7532b006..4feec90b2 100644 --- a/MagickCore/enhance.c +++ b/MagickCore/enhance.c @@ -1990,6 +1990,9 @@ MagickExport MagickBooleanType GrayscaleImage(Image *image, { image->intensity=method; image->type=GrayscaleType; + if ((method == Rec601LuminancePixelIntensityMethod) || + (method == Rec709LuminancePixelIntensityMethod)) + return(SetImageColorspace(image,GRAYColorspace,exception)); return(SetImageColorspace(image,sGRAYColorspace,exception)); } #endif @@ -2134,6 +2137,9 @@ MagickExport MagickBooleanType GrayscaleImage(Image *image, image_view=DestroyCacheView(image_view); image->intensity=method; image->type=GrayscaleType; + if ((method == Rec601LuminancePixelIntensityMethod) || + (method == Rec709LuminancePixelIntensityMethod)) + return(SetImageColorspace(image,GRAYColorspace,exception)); return(SetImageColorspace(image,sGRAYColorspace,exception)); } -- 2.40.0