CubeInfo
*cube_info;
- ssize_t
- y;
-
MagickBooleanType
proceed;
register const PixelPacket
*p;
- register ssize_t
- i,
- x;
-
register size_t
id,
index,
level;
+ register ssize_t
+ i,
+ x;
+
+ ssize_t
+ y;
+
/*
Initialize color description tree.
*/
node_info->list[i].pixel=(*p);
if ((image->colorspace == CMYKColorspace) ||
(image->storage_class == PseudoClass))
- node_info->list[i].index=indexes[x];
+ node_info->list[i].index=GetIndexPixelComponent(indexes+x);
node_info->list[i].count=1;
node_info->number_unique++;
cube_info->colors++;
CubeInfo
*cube_info;
- ssize_t
- y;
-
MagickPixelPacket
pixel,
target;
index,
level;
+ ssize_t
+ y;
+
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
node_info->list[i].pixel=(*p);
if ((image->colorspace == CMYKColorspace) ||
(image->storage_class == PseudoClass))
- node_info->list[i].index=indexes[x];
+ node_info->list[i].index=GetIndexPixelComponent(indexes+x);
node_info->list[i].count=1;
node_info->number_unique++;
cube_info->colors++;
CubeInfo
*cube_info;
- ssize_t
- y;
-
MagickPixelPacket
pixel,
target;
index,
level;
+ ssize_t
+ y;
+
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
node_info->list[i].pixel=(*p);
if ((image->colorspace == CMYKColorspace) ||
(image->storage_class == PseudoClass))
- node_info->list[i].index=indexes[x];
+ node_info->list[i].index=GetIndexPixelComponent(indexes+x);
node_info->list[i].count=1;
node_info->number_unique++;
cube_info->colors++;
% stretch the colors (and histogram) of the image. The stretch points are
% also moved further inward by the adjustment values given.
%
-% If the adjustment values are both zero this function is equivelent to a
+% If the adjustment values are both zero this function is equivalent to a
% perfect normalization (or autolevel) of the image.
%
% Each channel is stretched independantally of each other (producing color
HistogramCompare);
GetMagickPixelPacket(image,&pixel);
p=histogram;
+ status=MagickTrue;
for (i=0; i < (ssize_t) number_colors; i++)
{
SetMagickPixelPacket(image,&p->pixel,&p->index,&pixel);
}
(void) fflush(file);
histogram=(ColorPacket *) RelinquishMagickMemory(histogram);
+ if (status == MagickFalse)
+ return(0);
return(number_colors);
}
\f
register PixelPacket
*restrict q;
+ status=MagickTrue;
p=node_info->list;
for (i=0; i < (ssize_t) node_info->number_unique; i++)
{
status=MagickFalse;
}
cube_info->progress++;
+ if (status == MagickFalse)
+ return;
}
}