Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/3571
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Apr 24, 2021
1 parent 6cf7fd8 commit 68a0f3f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions magick/colorspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,10 @@ MagickExport MagickBooleanType RGBTransformImage(Image *image,
MagickRealType
gray;

gray=0.212656*GetPixelRed(q)+0.715158*GetPixelGreen(q)+
0.072186*GetPixelBlue(q);
SetPixelGray(q,ClampToQuantum(DecodePixelGamma(gray)));
gray=0.212656*DecodePixelGamma(GetPixelRed(q))+0.715158*
DecodePixelGamma(GetPixelGreen(q))+0.072186*
DecodePixelGamma(GetPixelBlue(q));
SetPixelGray(q,ClampToQuantum(gray));
q++;
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
Expand Down Expand Up @@ -2080,9 +2081,9 @@ MagickExport MagickBooleanType TransformRGBImage(Image *image,
MagickRealType
gray;

gray=0.212656*GetPixelRed(q)+0.715158*GetPixelGreen(q)+
0.072186*GetPixelBlue(q);
gray=EncodePixelGamma(gray);
gray=0.212656*EncodePixelGamma(GetPixelRed(q))+0.715158*
EncodePixelGamma(GetPixelGreen(q))+0.072186*
EncodePixelGamma(GetPixelBlue(q));
SetPixelRed(q,ClampToQuantum(gray));
SetPixelGreen(q,ClampToQuantum(gray));
SetPixelBlue(q,ClampToQuantum(gray));
Expand Down

0 comments on commit 68a0f3f

Please sign in to comment.