]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/1611
authorCristy <urban-warrior@imagemagick.org>
Sat, 22 Jun 2019 00:41:29 +0000 (20:41 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 22 Jun 2019 00:41:29 +0000 (20:41 -0400)
MagickCore/enhance.c
MagickCore/pixel-accessor.h

index ed3202757e2f80809a21e34e6185e0a70b9d2212..35346890a400f478eb51791459c572356e11249a 100644 (file)
@@ -1973,7 +1973,7 @@ MagickExport Image *EnhanceImage(const Image *image,ExceptionInfo *exception)
           pixel.black=((aggregate.black+total_weight/2.0)/total_weight);
           pixel.alpha=((aggregate.alpha+total_weight/2.0)/total_weight);
         }
-      SetPixelViaPixelInfo(image,&pixel,q);
+      SetPixelViaPixelInfo(enhance_image,&pixel,q);
       p+=GetPixelChannels(image);
       q+=GetPixelChannels(enhance_image);
     }
index 56fba6c9784c122fc5079f95ba68e0569c7a0fc1..8af0e369cfbbd48aaa0c5cff8c56dc118e5859f0 100644 (file)
@@ -111,7 +111,7 @@ static inline PixelTrait GetPixelCbTraits(const Image *magick_restrict image)
 static inline Quantum GetPixelChannel(const Image *magick_restrict image,
   const PixelChannel channel,const Quantum *magick_restrict pixel)
 {
-  if (image->channel_map[image->channel_map[channel].offset].traits == UndefinedPixelTrait)
+  if (image->channel_map[channel].traits == UndefinedPixelTrait)
     return((Quantum) 0);
   return(pixel[image->channel_map[channel].offset]);
 }