ssize_t
n,
y;
-
+
switch (type)
{
case MaximumStatistic:
*p;
ssize_t
+ offset,
x;
p=GetVirtualPixels(image,0,y,image->columns,1,exception);
PixelTrait traits=GetPixelChannelTraits(image,channel);
if (traits == UndefinedPixelTrait)
continue;
- match=fabs((double) p[channel]-target) < 0.5 ? MagickTrue : MagickFalse;
+ offset=GetPixelChannelOffset(image,channel);
+ match=fabs((double) p[offset]-target) < 0.5 ? MagickTrue : MagickFalse;
if (match != MagickFalse)
{
if ((max_locations != 0) && (n >= max_locations))
(void) FormatLocaleFile(file," %.20g,%.20g",(double) x,(double) y);
n++;
}
- p++;
+ p+=GetPixelChannels(image);
}
if (x < (ssize_t) image->columns)
break;