From db483811d47fea2d053441d5c60457ab47f30b24 Mon Sep 17 00:00:00 2001 From: cristy Date: Thu, 8 Sep 2011 13:17:11 +0000 Subject: [PATCH] --- MagickCore/enhance.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c index 5114977d5..d36c35537 100644 --- a/MagickCore/enhance.c +++ b/MagickCore/enhance.c @@ -1605,7 +1605,7 @@ MagickExport MagickBooleanType EqualizeImage(Image *image, Equalize colormap. */ #if defined(MAGICKCORE_OPENMP_SUPPORT) - #pragma omp parallel for schedule(dynamic,4) shared(progress,status) + #pragma omp parallel for schedule(dynamic,4) shared(progress,status) #endif for (j=0; j < (ssize_t) image->colors; j++) { @@ -1614,36 +1614,36 @@ MagickExport MagickBooleanType EqualizeImage(Image *image, { i=GetPixelChannelMapChannel(image,RedPixelChannel); if (black[i] != white[i]) - image->colormap[i].red=ClampToQuantum(equalize_map[ + image->colormap[j].red=ClampToQuantum(equalize_map[ GetPixelChannels(image)*ScaleQuantumToMap( - image->colormap[i].red)]+i); + image->colormap[j].red)]+i); } if (((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0) && (white[i]!= black[i])) { i=GetPixelChannelMapChannel(image,GreenPixelChannel); if (black[i] != white[i]) - image->colormap[i].green=ClampToQuantum(equalize_map[ + image->colormap[j].green=ClampToQuantum(equalize_map[ GetPixelChannels(image)*ScaleQuantumToMap( - image->colormap[i].red)]+i); + image->colormap[j].red)]+i); } if (((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0) && (white[i]!= black[i])) { i=GetPixelChannelMapChannel(image,BluePixelChannel); if (black[i] != white[i]) - image->colormap[i].blue=ClampToQuantum(equalize_map[ + image->colormap[j].blue=ClampToQuantum(equalize_map[ GetPixelChannels(image)*ScaleQuantumToMap( - image->colormap[i].blue)]+i); + image->colormap[j].blue)]+i); } if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) && (white[i]!= black[i])) { i=GetPixelChannelMapChannel(image,AlphaPixelChannel); if (black[i] != white[i]) - image->colormap[i].alpha=ClampToQuantum(equalize_map[ + image->colormap[j].alpha=ClampToQuantum(equalize_map[ GetPixelChannels(image)*ScaleQuantumToMap( - image->colormap[i].alpha)]+i); + image->colormap[j].alpha)]+i); } } } -- 2.50.1