]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/303
authorCristy <urban-warrior@imagemagick.org>
Mon, 4 Sep 2017 21:49:21 +0000 (17:49 -0400)
committerCristy <urban-warrior@imagemagick.org>
Mon, 4 Sep 2017 21:49:21 +0000 (17:49 -0400)
MagickCore/quantum-import.c

index 4f1c9e8d17dbaa944a0d7d00dd3089a11024419c..2a33fa7278cdad561e2fe3076b55ab5f20e94f3c 100644 (file)
@@ -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);
           }