]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 8 Sep 2011 13:13:04 +0000 (13:13 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 8 Sep 2011 13:13:04 +0000 (13:13 +0000)
MagickCore/enhance.c

index b985258d88f67350c0e48611f6f4a84b646d857e..5114977d54d4684b38fb775fcd688048907e01b4 100644 (file)
@@ -1155,7 +1155,7 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image,
         Stretch-contrast 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++)
       {
@@ -1163,33 +1163,33 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image,
           {
             i=GetPixelChannelMapChannel(image,RedPixelChannel);
             if (black[i] != white[i])
-              image->colormap[i].red=ClampToQuantum(stretch_map[
+              image->colormap[j].red=ClampToQuantum(stretch_map[
                 GetPixelChannels(image)*ScaleQuantumToMap(
-                image->colormap[i].red)]+i);
+                image->colormap[j].red)]+i);
           }
         if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
           {
             i=GetPixelChannelMapChannel(image,GreenPixelChannel);
             if (black[i] != white[i])
-              image->colormap[i].red=ClampToQuantum(stretch_map[
+              image->colormap[j].green=ClampToQuantum(stretch_map[
                 GetPixelChannels(image)*ScaleQuantumToMap(
-                image->colormap[i].red)]+i);
+                image->colormap[j].green)]+i);
           }
         if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
           {
             i=GetPixelChannelMapChannel(image,BluePixelChannel);
             if (black[i] != white[i])
-              image->colormap[i].red=ClampToQuantum(stretch_map[
+              image->colormap[j].blue=ClampToQuantum(stretch_map[
                 GetPixelChannels(image)*ScaleQuantumToMap(
-                image->colormap[i].red)]+i);
+                image->colormap[j].blue)]+i);
           }
         if ((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0)
           {
             i=GetPixelChannelMapChannel(image,AlphaPixelChannel);
             if (black[i] != white[i])
-              image->colormap[i].red=ClampToQuantum(stretch_map[
+              image->colormap[j].alpha=ClampToQuantum(stretch_map[
                 GetPixelChannels(image)*ScaleQuantumToMap(
-                image->colormap[i].red)]+i);
+                image->colormap[j].alpha)]+i);
           }
       }
     }