]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sat, 24 Dec 2016 18:25:24 +0000 (13:25 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 24 Dec 2016 18:25:24 +0000 (13:25 -0500)
MagickCore/quantum-import.c

index 1f10431c66e084697570ed6e01a1264e9d43f9e1..c5aa3f17aa41b42849d5271b8d32a3d14a134e0d 100644 (file)
@@ -2087,6 +2087,18 @@ static void ImportGrayQuantum(const Image *image,QuantumInfo *quantum_info,
       unsigned char
         pixel;
 
+      if (quantum_info->min_is_white != MagickFalse)
+        {
+          for (x=0; x < (ssize_t) number_pixels; x++)
+          {
+            p=PushCharPixel(p,&pixel);
+            SetPixelGray(image,QuantumRange-ScaleCharToQuantum(pixel),q);
+            SetPixelAlpha(image,OpaqueAlpha,q);
+            p+=quantum_info->pad;
+            q+=GetPixelChannels(image);
+          }
+          break;
+        }
       for (x=0; x < (ssize_t) number_pixels; x++)
       {
         p=PushCharPixel(p,&pixel);