From d5cd04cf0ba2d619f9c4171465a9dc37a58b3e15 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 7 Sep 2019 08:48:48 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1680 --- MagickCore/colorspace.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/MagickCore/colorspace.c b/MagickCore/colorspace.c index e6596660b..286d94ed2 100644 --- a/MagickCore/colorspace.c +++ b/MagickCore/colorspace.c @@ -380,6 +380,11 @@ static MagickBooleanType sRGBTransformImage(Image *image, return(status); } case LinearGRAYColorspace: + { + if ((image->intensity != Rec601LuminancePixelIntensityMethod) && + (image->intensity != Rec709LuminancePixelIntensityMethod)) + image->intensity=Rec709LuminancePixelIntensityMethod; + } case GRAYColorspace: { /* @@ -1157,10 +1162,7 @@ MagickExport MagickBooleanType SetImageColorspace(Image *image, if (IsGrayColorspace(colorspace) != MagickFalse) { if (colorspace == LinearGRAYColorspace) - { - image->gamma=1.000; - image->intensity=Rec709LuminancePixelIntensityMethod; - } + image->gamma=1.000; type=GrayscaleType; } else -- 2.40.0