]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/1680
authorCristy <urban-warrior@imagemagick.org>
Sat, 7 Sep 2019 12:48:48 +0000 (08:48 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 7 Sep 2019 12:48:48 +0000 (08:48 -0400)
MagickCore/colorspace.c

index e6596660b623523df1191bc4904968bbf14ecbcd..286d94ed285b39a9aedcbc48d55e5da889d28ea4 100644 (file)
@@ -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