From: Cristy Date: Mon, 4 Sep 2017 21:49:21 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/303 X-Git-Tag: 7.0.7-1~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9a764885ca8e7520f541853b73e3419efd612f7;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/303 --- diff --git a/MagickCore/quantum-import.c b/MagickCore/quantum-import.c index 4f1c9e8d1..2a33fa727 100644 --- a/MagickCore/quantum-import.c +++ b/MagickCore/quantum-import.c @@ -2234,7 +2234,7 @@ static void ImportGrayQuantum(const Image *image,QuantumInfo *quantum_info, for (x=0; x < (ssize_t) number_pixels; x++) { p=PushShortPixel(quantum_info->endian,p,&pixel); - SetPixelGray(image,ScaleShortToQuantum(pixel),q); + SetPixelGray(image,QuantumRange-ScaleShortToQuantum(pixel),q); p+=quantum_info->pad; q+=GetPixelChannels(image); }