diff --git a/coders/histogram.c b/coders/histogram.c
index 6adcad6..7e0f11b 100644
--- a/coders/histogram.c
+++ b/coders/histogram.c
@@ -277,7 +277,7 @@
         histogram[ScaleQuantumToChar(GetPixelGreen(image,p))].green++;
       if ((GetPixelBlueTraits(image) & ActivePixelTrait) != 0)
         histogram[ScaleQuantumToChar(GetPixelBlue(image,p))].blue++;
-      p+=GetPixelChannels(image);
+      p+=GetPixelComponents(image);
     }
   }
   maximum=histogram[0].red;