]> granicus.if.org Git - imagemagick/commitdiff
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=29708
authorCristy <urban-warrior@imagemagick.org>
Tue, 17 May 2016 20:50:29 +0000 (16:50 -0400)
committerCristy <urban-warrior@imagemagick.org>
Tue, 17 May 2016 20:50:29 +0000 (16:50 -0400)
MagickCore/enhance.c

index 09fe914a0c310a420a2c64e3a242c629b589f81e..e3118973bfabb0177c52fd272beefd7f01a8c885 100644 (file)
@@ -1574,7 +1574,12 @@ MagickExport MagickBooleanType EqualizeImage(Image *image,
     {
       for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
       {
-        double intensity=GetPixelIntensity(image,p);
+        double
+          intensity;
+
+        intensity=p[i];
+        if ((image->channel_mask & SyncChannels) != 0)
+          intensity=GetPixelIntensity(image,p);
         histogram[GetPixelChannels(image)*ScaleQuantumToMap(intensity)+i]++;
       }
       p+=GetPixelChannels(image);