From: Cristy Date: Sun, 12 Feb 2017 20:58:13 +0000 (-0500) Subject: ... X-Git-Tag: 7.0.4-8~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ec4de14a381bedbe0a2a32d6b43bba98f57c27a;p=imagemagick ... --- diff --git a/MagickCore/statistic.c b/MagickCore/statistic.c index 5a9e9e45a..ac4c6fde9 100644 --- a/MagickCore/statistic.c +++ b/MagickCore/statistic.c @@ -1984,12 +1984,12 @@ MagickExport ChannelStatistics *GetImageStatistics(const Image *image, channel_statistics[channel].sum_fourth_power+=(double) p[i]*p[i]*p[i]* p[i]; channel_statistics[channel].area++; - histogram[GetPixelChannels(image)*ScaleQuantumToMap( - ClampToQuantum((double) p[i]))+channel]++; if ((double) p[i] < channel_statistics[CompositePixelChannel].minima) channel_statistics[CompositePixelChannel].minima=(double) p[i]; if ((double) p[i] > channel_statistics[CompositePixelChannel].maxima) channel_statistics[CompositePixelChannel].maxima=(double) p[i]; + histogram[GetPixelChannels(image)*ScaleQuantumToMap( + ClampToQuantum((double) p[i]))+i]++; channel_statistics[CompositePixelChannel].sum+=(double) p[i]; channel_statistics[CompositePixelChannel].sum_squared+=(double) p[i]*p[i];