diff --git a/MagickCore/cache.c b/MagickCore/cache.c
index 8da3c3c..f5b23fc 100644
--- a/MagickCore/cache.c
+++ b/MagickCore/cache.c
@@ -3143,7 +3143,7 @@
 
   Quantum
     *pixels,
-    virtual_pixel[MaxPixelChannels];
+    virtual_pixel[CompositePixelChannel];
 
   RectangleInfo
     region;
diff --git a/MagickCore/compare.c b/MagickCore/compare.c
index 0e21c76..4b5bd0f 100644
--- a/MagickCore/compare.c
+++ b/MagickCore/compare.c
@@ -379,7 +379,7 @@
       if (difference != MagickFalse)
         {
           channel_distortion[i]++;
-          channel_distortion[MaxPixelChannels]++;
+          channel_distortion[CompositePixelChannel]++;
         }
       p+=GetPixelChannels(image);
       q+=GetPixelChannels(reconstruct_image);
@@ -491,7 +491,7 @@
           reconstruct_image,channel,q));
         distance*=distance;
         channel_distortion[i]+=distance;
-        channel_distortion[MaxPixelChannels]+=distance;
+        channel_distortion[CompositePixelChannel]+=distance;
       }
       p+=GetPixelChannels(image);
       q+=GetPixelChannels(reconstruct_image);
@@ -506,8 +506,8 @@
   image_view=DestroyCacheView(image_view);
   for (i=0; i <= MaxPixelChannels; i++)
     distortion[i]/=((double) image->columns*image->rows);
-  distortion[MaxPixelChannels]/=(double) GetImageChannels(image);
-  distortion[MaxPixelChannels]=sqrt(distortion[MaxPixelChannels]);
+  distortion[CompositePixelChannel]/=(double) GetImageChannels(image);
+  distortion[CompositePixelChannel]=sqrt(distortion[CompositePixelChannel]);
   return(status);
 }
 
@@ -585,7 +585,7 @@
         distance=QuantumScale*fabs(p[i]-(MagickRealType) GetPixelChannel(
           reconstruct_image,channel,q));
         channel_distortion[i]+=distance;
-        channel_distortion[MaxPixelChannels]+=distance;
+        channel_distortion[CompositePixelChannel]+=distance;
       }
       p+=GetPixelChannels(image);
       q+=GetPixelChannels(reconstruct_image);
@@ -600,7 +600,7 @@
   image_view=DestroyCacheView(image_view);
   for (i=0; i <= MaxPixelChannels; i++)
     distortion[i]/=((double) image->columns*image->rows);
-  distortion[MaxPixelChannels]/=(double) GetImageChannels(image);
+  distortion[CompositePixelChannel]/=(double) GetImageChannels(image);
   return(status);
 }
 
@@ -677,7 +677,7 @@
         distance=fabs((double) (alpha*p[i]-beta*GetPixelChannel(
           reconstruct_image,channel,q)));
         distortion[i]+=distance;
-        distortion[MaxPixelChannels]+=distance;
+        distortion[CompositePixelChannel]+=distance;
         mean_error+=distance*distance;
         if (distance > maximum_error)
           maximum_error=distance;
@@ -689,7 +689,7 @@
   }
   reconstruct_view=DestroyCacheView(reconstruct_view);
   image_view=DestroyCacheView(image_view);
-  image->error.mean_error_per_pixel=distortion[MaxPixelChannels]/area;
+  image->error.mean_error_per_pixel=distortion[CompositePixelChannel]/area;
   image->error.normalized_mean_error=QuantumScale*QuantumScale*mean_error/area;
   image->error.normalized_maximum_error=QuantumScale*maximum_error;
   return(status);
@@ -770,7 +770,7 @@
           reconstruct_image,channel,q));
         distance*=distance;
         channel_distortion[i]+=distance;
-        channel_distortion[MaxPixelChannels]+=distance;
+        channel_distortion[CompositePixelChannel]+=distance;
       }
       p+=GetPixelChannels(image);
       q+=GetPixelChannels(reconstruct_image);
@@ -785,7 +785,7 @@
   image_view=DestroyCacheView(image_view);
   for (i=0; i <= MaxPixelChannels; i++)
     distortion[i]/=((double) image->columns*image->rows);
-  distortion[MaxPixelChannels]/=GetImageChannels(image);
+  distortion[CompositePixelChannel]/=GetImageChannels(image);
   return(status);
 }
 
@@ -894,7 +894,7 @@
   /*
     Divide by the standard deviation.
   */
-  distortion[MaxPixelChannels]=0.0;
+  distortion[CompositePixelChannel]=0.0;
   for (i=0; i < MaxPixelChannels; i++)
   {
     MagickRealType
@@ -908,9 +908,9 @@
       reconstruct_statistics[channel].standard_deviation;
     gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
     distortion[i]=QuantumRange*gamma*distortion[i];
-    distortion[MaxPixelChannels]+=distortion[i]*distortion[i];
+    distortion[CompositePixelChannel]+=distortion[i]*distortion[i];
   }
-  distortion[MaxPixelChannels]=sqrt(distortion[MaxPixelChannels]/
+  distortion[CompositePixelChannel]=sqrt(distortion[CompositePixelChannel]/
     GetImageChannels(image));
   /*
     Free resources.
@@ -994,8 +994,8 @@
           reconstruct_image,channel,q));
         if (distance > channel_distortion[i])
           channel_distortion[i]=distance;
-        if (distance > channel_distortion[MaxPixelChannels])
-          channel_distortion[MaxPixelChannels]=distance;
+        if (distance > channel_distortion[CompositePixelChannel])
+          channel_distortion[CompositePixelChannel]=distance;
       }
       p+=GetPixelChannels(image);
       q+=GetPixelChannels(image);
@@ -1136,7 +1136,7 @@
       break;
     }
   }
-  *distortion=channel_distortion[MaxPixelChannels];
+  *distortion=channel_distortion[CompositePixelChannel];
   channel_distortion=(double *) RelinquishMagickMemory(channel_distortion);
   return(status);
 }
diff --git a/MagickCore/composite.c b/MagickCore/composite.c
index a2e4ab2..038ea55 100644
--- a/MagickCore/composite.c
+++ b/MagickCore/composite.c
@@ -342,7 +342,7 @@
     Darken is equivalent to a 'Minimum' method OR a greyscale version of a
     binary 'Or' OR the 'Intersection' of pixel sets.
   */
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels.
@@ -382,7 +382,7 @@
     If 'Sync' flag select whole pixel based on alpha weighted intensity.
     Otherwise use intensity only, but restrict copy according to channel.
   */
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       MagickBooleanType
         from_p;
@@ -427,7 +427,7 @@
 
   Sa=QuantumScale*p->alpha;  /* simplify and speed up equations */
   Da=QuantumScale*q->alpha;
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels.
@@ -485,7 +485,7 @@
 
   Sa=QuantumScale*p->alpha;  /* simplify and speed up equations */
   Da=QuantumScale*q->alpha;
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels.
@@ -537,7 +537,7 @@
 
   Sa=QuantumScale*p->alpha;  /* simplify and speed up equations */
   Da=QuantumScale*q->alpha;
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels.
@@ -691,7 +691,7 @@
     Lighten is also equvalent to a 'Maximum' method OR a greyscale version of a
     binary 'And' OR the 'Union' of pixel sets.
   */
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels
@@ -731,7 +731,7 @@
     If 'Sync' flag select whole pixel based on alpha weighted intensity.
     Otherwise use Intenisty only, but restrict copy according to channel.
   */
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       MagickBooleanType
         from_p;
@@ -891,7 +891,7 @@
 
   Sa=QuantumScale*p->alpha; /* ??? - AT */
   Da=QuantumScale*q->alpha;
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels.
@@ -945,7 +945,7 @@
     The CompositePixelInfoPlus() function is defined in
     "composite-private.h" so it can also be used for Image Blending.
   */
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels.
@@ -988,7 +988,7 @@
 
   Sa=QuantumScale*p->alpha;  /* simplify and speed up equations */
   Da=QuantumScale*q->alpha;
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels.
@@ -1036,7 +1036,7 @@
     gamma,
     Sa;
 
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels.
@@ -1086,7 +1086,7 @@
     gamma,
     Sa;
 
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels,
@@ -1132,7 +1132,7 @@
 
   Sa=QuantumScale*p->alpha;  /* simplify and speed up equations */
   Da=QuantumScale*q->alpha;
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels.
@@ -1290,7 +1290,7 @@
 
   Sa=QuantumScale*p->alpha;  /* simplify and speed up equations */
   Da=QuantumScale*q->alpha;
-  if (image->sync == MagickFalse)
+  if (image->channel_mask != DefaultChannels)
     {
       /*
         Handle channels as separate grayscale channels.
diff --git a/MagickCore/display.c b/MagickCore/display.c
index e89f51e..e519246 100644
--- a/MagickCore/display.c
+++ b/MagickCore/display.c
@@ -3758,7 +3758,7 @@
               target;
 
             Quantum
-              virtual_pixel[MaxPixelChannels];
+              virtual_pixel[CompositePixelChannel];
 
             /*
               Update color information using replace algorithm.
@@ -10120,7 +10120,7 @@
               target;
 
             Quantum
-              virtual_pixel[MaxPixelChannels];
+              virtual_pixel[CompositePixelChannel];
 
             /*
               Update matte information using replace algorithm.
@@ -13245,7 +13245,7 @@
         pixel;
 
       Quantum
-        virtual_pixel[MaxPixelChannels];
+        virtual_pixel[CompositePixelChannel];
 
       register int
         j;
diff --git a/MagickCore/draw.c b/MagickCore/draw.c
index b3ed819..b749b17 100644
--- a/MagickCore/draw.c
+++ b/MagickCore/draw.c
@@ -4194,7 +4194,7 @@
             target;
 
           Quantum
-            virtual_pixel[MaxPixelChannels];
+            virtual_pixel[CompositePixelChannel];
 
           (void) GetOneCacheViewVirtualPixel(image_view,x,y,virtual_pixel,
             exception);
@@ -4317,7 +4317,7 @@
             target;
 
           Quantum
-            virtual_pixel[MaxPixelChannels];
+            virtual_pixel[CompositePixelChannel];
 
           (void) GetOneCacheViewVirtualPixel(image_view,x,y,virtual_pixel,
             exception);
diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c
index 07db5ff..1877b24 100644
--- a/MagickCore/enhance.c
+++ b/MagickCore/enhance.c
@@ -116,7 +116,7 @@
     i;
 
   log_mean=log(0.5);
-  if (image->sync != MagickFalse)
+  if (image->channel_mask == DefaultChannels)
     {
       /*
         Apply gamma correction equally across all given channels.
@@ -1483,11 +1483,11 @@
     progress;
 
   MagickRealType
-    black[MaxPixelChannels],
+    black[CompositePixelChannel],
     *equalize_map,
     *histogram,
     *map,
-    white[MaxPixelChannels];
+    white[CompositePixelChannel];
 
   register ssize_t
     i;
diff --git a/MagickCore/fx.c b/MagickCore/fx.c
index 3cf7880..2ee6b51 100644
--- a/MagickCore/fx.c
+++ b/MagickCore/fx.c
@@ -4684,7 +4684,7 @@
       for (x=0; (x < (ssize_t) watermark->columns) && (j < (ssize_t) depth); x++)
       {
         Quantum
-          virtual_pixel[MaxPixelChannels];
+          virtual_pixel[CompositePixelChannel];
 
         (void) GetOneCacheViewVirtualPixel(watermark_view,x,y,virtual_pixel,
           exception);
diff --git a/MagickCore/histogram.c b/MagickCore/histogram.c
index 9078fc3..af17ac2 100644
--- a/MagickCore/histogram.c
+++ b/MagickCore/histogram.c
@@ -994,7 +994,7 @@
     status;
 
   status=MagickTrue;
-  if (image->sync != MagickFalse)
+  if (image->channel_mask == DefaultChannels)
     {
       /*
         Auto-level all channels equally.
diff --git a/MagickCore/image.c b/MagickCore/image.c
index 4f56f59..c31f1a3 100644
--- a/MagickCore/image.c
+++ b/MagickCore/image.c
@@ -826,7 +826,6 @@
   clone_image->magick_columns=image->magick_columns;
   clone_image->magick_rows=image->magick_rows;
   clone_image->type=image->type;
-  clone_image->sync=image->sync;
   clone_image->channel_mask=image->channel_mask;
   clone_image->channel_map=ClonePixelChannelMap(image->channel_map);
   (void) CopyMagickString(clone_image->magick_filename,image->magick_filename,
diff --git a/MagickCore/image.h b/MagickCore/image.h
index 0085554..6e6ecae 100644
--- a/MagickCore/image.h
+++ b/MagickCore/image.h
@@ -285,9 +285,6 @@
     number_meta_channels,
     metacontent_extent;
 
-  MagickBooleanType
-    sync;
-
   ChannelType
     channel_mask;
 
diff --git a/MagickCore/morphology.c b/MagickCore/morphology.c
index 6eeb389..139e3bf 100644
--- a/MagickCore/morphology.c
+++ b/MagickCore/morphology.c
@@ -2656,7 +2656,7 @@
         */
         k = &kernel->values[ kernel->height-1 ];
         k_pixels = p;
-        if ( (image->sync == MagickFalse) || (image->matte == MagickFalse) )
+        if ( (image->channel_mask != DefaultChannels) || (image->matte == MagickFalse) )
           { /* No 'Sync' involved.
             ** Convolution is simple greyscale channel operation
             */
@@ -2880,7 +2880,7 @@
             */
             k = &kernel->values[ kernel->width*kernel->height-1 ];
             k_pixels = p;
-            if ( (image->sync == MagickFalse) ||
+            if ( (image->channel_mask != DefaultChannels) ||
                  (image->matte == MagickFalse) )
               { /* No 'Sync' involved.
                 ** Convolution is simple greyscale channel operation
@@ -4091,7 +4091,6 @@
             (void) FormatLocaleFile(stderr,
               "\n%s: Difference with original image",CommandOptionToMnemonic(
               MagickMorphologyOptions, method) );
-          curr_image->sync=MagickFalse;
           (void) CompositeImage(curr_image,DifferenceCompositeOp,image,0,0,
             exception);
           break;
@@ -4100,7 +4099,6 @@
             (void) FormatLocaleFile(stderr,
               "\n%s: Difference of Dilate and Erode",CommandOptionToMnemonic(
               MagickMorphologyOptions, method) );
-          curr_image->sync=MagickFalse;
           (void) CompositeImage(curr_image,DifferenceCompositeOp,save_image,0,
             0,exception);
           save_image = DestroyImage(save_image); /* finished with save image */
@@ -4138,7 +4136,6 @@
           if ( verbose == MagickTrue )
             (void) FormatLocaleFile(stderr, " (compose \"%s\")",
                  CommandOptionToMnemonic(MagickComposeOptions, rslt_compose) );
-          rslt_image->sync=MagickFalse;
           (void) CompositeImage(rslt_image, rslt_compose, curr_image, 0, 0,
             exception);
           curr_image = DestroyImage(curr_image);
diff --git a/MagickCore/pixel.c b/MagickCore/pixel.c
index 9042564..c6b42f7 100644
--- a/MagickCore/pixel.c
+++ b/MagickCore/pixel.c
@@ -3573,7 +3573,6 @@
     SetPixelChannelMapChannel(image,(PixelChannel) i,(PixelChannel) i);
     SetPixelChannelMapTraits(image,(PixelChannel) i,UndefinedPixelTrait);
   }
-  image->sync=MagickTrue;
   image->number_channels=4;
   if (0 && image->colorspace == GRAYColorspace)
     image->number_channels=2;
@@ -5102,8 +5101,8 @@
     distance,
     scale;
 
-  fuzz=MagickMax(image->fuzz,(MagickRealType) MagickSQ1_2)*
-    MagickMax(image->fuzz,(MagickRealType) MagickSQ1_2);
+  fuzz=MagickMax(image->fuzz,(MagickRealType) MagickSQ1_2)*MagickMax(
+    image->fuzz,(MagickRealType) MagickSQ1_2);
   scale=1.0;
   distance=0.0;
   if (image->matte != MagickFalse)
@@ -5173,13 +5172,13 @@
 %  colors is less than the specified distance in a linear three (or four)
 %  dimensional color space.
 %
-%  This implements the equivalent of...
-%    fuzz < sqrt( color_distance^2 * u.a*v.a  + alpha_distance^2 )
+%  This implements the equivalent of:
+%    fuzz < sqrt(color_distance^2 * u.a*v.a  + alpha_distance^2)
 %
 %  Which produces a multi-dimensional cone for that colorspace along the
 %  transparency vector.
 %
-%  For example for an RGB
+%  For example for an RGB:
 %    color_distance^2  = ( (u.r-v.r)^2 + (u.g-v.g)^2 + (u.b-v.b)^2 ) / 3
 %
 %  See http://www.imagemagick.org/Usage/bugs/fuzz_distance/
@@ -5216,14 +5215,14 @@
   if ((p->fuzz == 0.0) && (q->fuzz == 0.0))
     return(IsPixelInfoEquivalent(p,q));
   if (p->fuzz == 0.0)
-    fuzz=MagickMax(q->fuzz,(MagickRealType) MagickSQ1_2)*
-      MagickMax(q->fuzz,(MagickRealType) MagickSQ1_2);
+    fuzz=MagickMax(q->fuzz,(MagickRealType) MagickSQ1_2)*MagickMax(q->fuzz,
+      (MagickRealType) MagickSQ1_2);
   else if (q->fuzz == 0.0)
-    fuzz=MagickMax(p->fuzz,(MagickRealType) MagickSQ1_2)*
-      MagickMax(p->fuzz,(MagickRealType) MagickSQ1_2);
+    fuzz=MagickMax(p->fuzz,(MagickRealType) MagickSQ1_2)*MagickMax(p->fuzz,
+      (MagickRealType) MagickSQ1_2);
   else
-    fuzz=MagickMax(p->fuzz,(MagickRealType) MagickSQ1_2)*
-      MagickMax(q->fuzz,(MagickRealType) MagickSQ1_2);
+    fuzz=MagickMax(p->fuzz,(MagickRealType) MagickSQ1_2)*MagickMax(q->fuzz,
+      (MagickRealType) MagickSQ1_2);
   scale=1.0;
   distance=0.0;
   if ((p->matte != MagickFalse) || (q->matte != MagickFalse))
@@ -5238,7 +5237,7 @@
         return(MagickFalse);
       /*
         Generate a alpha scaling factor to generate a 4D cone on colorspace.
-        Note that if one color is transparent, distance has no color component.
+        If one color is transparent, distance has no color component.
       */
       if (p->matte != MagickFalse)
         scale=(QuantumScale*p->alpha);
@@ -5268,10 +5267,10 @@
   if ((p->colorspace == HSLColorspace) || (p->colorspace == HSBColorspace) ||
       (p->colorspace == HWBColorspace))
     {
-      /* This calculates a arc distance for hue
-         Really if should be a vector angle of 'S'/'W' length
-         with 'L'/'B' forming appropriate cones.
-         In other words this is a hack - Anthony
+      /*
+        This calculates a arc distance for hue-- it should be a vector angle
+        of 'S'/'W' length with 'L'/'B' forming appropriate cones.  In other
+        words this is a hack - Anthony.
       */
       if (fabs((double) pixel) > (QuantumRange/2))
         pixel-=QuantumRange;
@@ -5324,7 +5323,6 @@
   register ssize_t
     i;
 
-  image->sync=channel_mask == DefaultChannels ? MagickTrue : MagickFalse;
   for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
     SetPixelChannelMapTraits(image,(PixelChannel) i,
       GetChannelBit(channel_mask,i) != 0 ? UpdatePixelTrait : CopyPixelTrait);
@@ -5345,8 +5343,8 @@
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  SetPixelChannelMask() sets the pixel channel mask from the specified
-%  channel mask.
+%  SetPixelChannelMask() sets the pixel channel mask from the specified channel
+%  mask.
 %
 %  The format of the SetPixelChannelMask method is:
 %
diff --git a/MagickCore/pixel.h b/MagickCore/pixel.h
index c852801..5258c58 100644
--- a/MagickCore/pixel.h
+++ b/MagickCore/pixel.h
@@ -58,6 +58,7 @@
   IndexPixelChannel = 4,
   MaskPixelChannel = 5,
   IntensityPixelChannel = MaxPixelChannels,
+  CompositePixelChannel = MaxPixelChannels,
   SyncPixelChannel = MaxPixelChannels+1
 } PixelChannel;
 
diff --git a/MagickCore/profile.c b/MagickCore/profile.c
index 0226af7..f63f5f0 100644
--- a/MagickCore/profile.c
+++ b/MagickCore/profile.c
@@ -5777,6 +5777,7 @@
         cmsSetLogErrorHandler(CMSExceptionHandler);
         cms_exception.image=image;
         cms_exception.exception=exception;
+        (void) cms_exception;
         source_profile=cmsOpenProfileFromMemTHR(&cms_exception,
           GetStringInfoDatum(profile),(cmsUInt32Number)
           GetStringInfoLength(profile));
diff --git a/MagickCore/resize.c b/MagickCore/resize.c
index 7919da6..34bd016 100644
--- a/MagickCore/resize.c
+++ b/MagickCore/resize.c
@@ -2806,7 +2806,7 @@
   MagickRealType
     alpha,
     gamma,
-    pixel[MaxPixelChannels],
+    pixel[CompositePixelChannel],
     *scale_scanline,
     *scanline,
     *x_vector,
diff --git a/MagickCore/statistic.c b/MagickCore/statistic.c
index 7166378..26d9a3d 100644
--- a/MagickCore/statistic.c
+++ b/MagickCore/statistic.c
@@ -131,7 +131,7 @@
 typedef struct _PixelChannels
 {
   MagickRealType
-    channel[MaxPixelChannels];
+    channel[CompositePixelChannel];
 } PixelChannels;
 
 static PixelChannels **DestroyPixelThreadSet(PixelChannels **pixels)
@@ -1163,8 +1163,8 @@
   if (channel_statistics == (ChannelStatistics *) NULL)
     return(MagickFalse);
   area=0;
-  channel_statistics[MaxPixelChannels].mean=0.0;
-  channel_statistics[MaxPixelChannels].standard_deviation=0.0;
+  channel_statistics[CompositePixelChannel].mean=0.0;
+  channel_statistics[CompositePixelChannel].standard_deviation=0.0;
   for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
   {
     PixelTrait
@@ -1175,17 +1175,17 @@
       continue;
     if ((traits & UpdatePixelTrait) == 0)
       continue;
-    channel_statistics[MaxPixelChannels].mean+=channel_statistics[i].mean;
-    channel_statistics[MaxPixelChannels].standard_deviation+=
+    channel_statistics[CompositePixelChannel].mean+=channel_statistics[i].mean;
+    channel_statistics[CompositePixelChannel].standard_deviation+=
       channel_statistics[i].variance-channel_statistics[i].mean*
       channel_statistics[i].mean;
     area++;
   }
-  channel_statistics[MaxPixelChannels].mean/=area;
-  channel_statistics[MaxPixelChannels].standard_deviation=
-    sqrt(channel_statistics[MaxPixelChannels].standard_deviation/area);
-  *mean=channel_statistics[MaxPixelChannels].mean;
-  *standard_deviation=channel_statistics[MaxPixelChannels].standard_deviation;
+  channel_statistics[CompositePixelChannel].mean/=area;
+  channel_statistics[CompositePixelChannel].standard_deviation=
+    sqrt(channel_statistics[CompositePixelChannel].standard_deviation/area);
+  *mean=channel_statistics[CompositePixelChannel].mean;
+  *standard_deviation=channel_statistics[CompositePixelChannel].standard_deviation;
   channel_statistics=(ChannelStatistics *) RelinquishMagickMemory(
     channel_statistics);
   return(MagickTrue);
@@ -1584,41 +1584,41 @@
   }
   for (i=0; i < (ssize_t) MaxPixelChannels; i++)
   {
-    channel_statistics[MaxPixelChannels].depth=(size_t) MagickMax((double)
-      channel_statistics[MaxPixelChannels].depth,(double)
+    channel_statistics[CompositePixelChannel].depth=(size_t) MagickMax((double)
+      channel_statistics[CompositePixelChannel].depth,(double)
       channel_statistics[i].depth);
-    channel_statistics[MaxPixelChannels].minima=MagickMin(
-      channel_statistics[MaxPixelChannels].minima,
+    channel_statistics[CompositePixelChannel].minima=MagickMin(
+      channel_statistics[CompositePixelChannel].minima,
       channel_statistics[i].minima);
-    channel_statistics[MaxPixelChannels].maxima=MagickMax(
-      channel_statistics[MaxPixelChannels].maxima,
+    channel_statistics[CompositePixelChannel].maxima=MagickMax(
+      channel_statistics[CompositePixelChannel].maxima,
       channel_statistics[i].maxima);
-    channel_statistics[MaxPixelChannels].sum+=channel_statistics[i].sum;
-    channel_statistics[MaxPixelChannels].sum_squared+=
+    channel_statistics[CompositePixelChannel].sum+=channel_statistics[i].sum;
+    channel_statistics[CompositePixelChannel].sum_squared+=
       channel_statistics[i].sum_squared;
-    channel_statistics[MaxPixelChannels].sum_cubed+=
+    channel_statistics[CompositePixelChannel].sum_cubed+=
       channel_statistics[i].sum_cubed;
-    channel_statistics[MaxPixelChannels].sum_fourth_power+=
+    channel_statistics[CompositePixelChannel].sum_fourth_power+=
       channel_statistics[i].sum_fourth_power;
-    channel_statistics[MaxPixelChannels].mean+=channel_statistics[i].mean;
-    channel_statistics[MaxPixelChannels].variance+=
+    channel_statistics[CompositePixelChannel].mean+=channel_statistics[i].mean;
+    channel_statistics[CompositePixelChannel].variance+=
       channel_statistics[i].variance-channel_statistics[i].mean*
       channel_statistics[i].mean;
-    channel_statistics[MaxPixelChannels].standard_deviation+=
+    channel_statistics[CompositePixelChannel].standard_deviation+=
       channel_statistics[i].variance-channel_statistics[i].mean*
       channel_statistics[i].mean;
   }
   channels=GetImageChannels(image);
-  channel_statistics[MaxPixelChannels].sum/=channels;
-  channel_statistics[MaxPixelChannels].sum_squared/=channels;
-  channel_statistics[MaxPixelChannels].sum_cubed/=channels;
-  channel_statistics[MaxPixelChannels].sum_fourth_power/=channels;
-  channel_statistics[MaxPixelChannels].mean/=channels;
-  channel_statistics[MaxPixelChannels].variance/=channels;
-  channel_statistics[MaxPixelChannels].standard_deviation=
-    sqrt(channel_statistics[MaxPixelChannels].standard_deviation/channels);
-  channel_statistics[MaxPixelChannels].kurtosis/=channels;
-  channel_statistics[MaxPixelChannels].skewness/=channels;
+  channel_statistics[CompositePixelChannel].sum/=channels;
+  channel_statistics[CompositePixelChannel].sum_squared/=channels;
+  channel_statistics[CompositePixelChannel].sum_cubed/=channels;
+  channel_statistics[CompositePixelChannel].sum_fourth_power/=channels;
+  channel_statistics[CompositePixelChannel].mean/=channels;
+  channel_statistics[CompositePixelChannel].variance/=channels;
+  channel_statistics[CompositePixelChannel].standard_deviation=
+    sqrt(channel_statistics[CompositePixelChannel].standard_deviation/channels);
+  channel_statistics[CompositePixelChannel].kurtosis/=channels;
+  channel_statistics[CompositePixelChannel].skewness/=channels;
   for (i=0; i <= (ssize_t) MaxPixelChannels; i++)
   {
     if (channel_statistics[i].standard_deviation == 0.0)
diff --git a/MagickCore/threshold.c b/MagickCore/threshold.c
index bc0ab96..e42e3ab 100644
--- a/MagickCore/threshold.c
+++ b/MagickCore/threshold.c
@@ -1224,7 +1224,7 @@
     progress;
 
   MagickRealType
-    levels[MaxPixelChannels];
+    levels[CompositePixelChannel];
 
   register ssize_t
     i;
diff --git a/MagickCore/xwindow.c b/MagickCore/xwindow.c
index 98145ab..6fa824d 100644
--- a/MagickCore/xwindow.c
+++ b/MagickCore/xwindow.c
@@ -484,7 +484,7 @@
     annotate_pixmap;
 
   Quantum
-    virtual_pixel[MaxPixelChannels];
+    virtual_pixel[CompositePixelChannel];
 
   unsigned int
     depth,
@@ -2327,7 +2327,7 @@
     matte;
 
   Quantum
-    virtual_pixel[MaxPixelChannels];
+    virtual_pixel[CompositePixelChannel];
 
   Pixmap
     draw_pixmap;