% August 2009 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
index=MaxTreeDepth-1;
for (level=1; level < MaxTreeDepth; level++)
{
- SetPixelInfo(image,p,&pixel);
+ GetPixelInfoPixel(image,p,&pixel);
id=ColorToNodeId(image,&pixel,index);
if (node_info->child[id] == (NodeInfo *) NULL)
{
image->filename);
return(0);
}
- node_info->list[i].red=GetPixelRed(image,p);
- node_info->list[i].green=GetPixelGreen(image,p);
- node_info->list[i].blue=GetPixelBlue(image,p);
+ node_info->list[i]=pixel;
+ node_info->list[i].red=(double) GetPixelRed(image,p);
+ node_info->list[i].green=(double) GetPixelGreen(image,p);
+ node_info->list[i].blue=(double) GetPixelBlue(image,p);
if (image->colorspace == CMYKColorspace)
- node_info->list[i].black=GetPixelBlack(image,p);
- node_info->list[i].alpha=GetPixelAlpha(image,p);
+ node_info->list[i].black=(double) GetPixelBlack(image,p);
+ node_info->list[i].alpha=(double) GetPixelAlpha(image,p);
node_info->list[i].count=1;
node_info->number_unique++;
cube_info->colors++;
p=node_info->list;
for (i=0; i < (ssize_t) node_info->number_unique; i++)
{
- (*histogram)->red=p->red;
- (*histogram)->green=p->green;
- (*histogram)->blue=p->blue;
- (*histogram)->black=p->black;
- (*histogram)->alpha=p->alpha;
- (*histogram)->count=p->count;
+ **histogram=(*p);
(*histogram)++;
p++;
}
index=MaxTreeDepth-1;
for (level=1; level < MaxTreeDepth; level++)
{
- SetPixelInfo(image,p,&pixel);
+ GetPixelInfoPixel(image,p,&pixel);
id=ColorToNodeId(image,&pixel,index);
if (node_info->child[id] == (NodeInfo *) NULL)
{
image->filename);
break;
}
- node_info->list[i].red=GetPixelRed(image,p);
- node_info->list[i].green=GetPixelGreen(image,p);
- node_info->list[i].blue=GetPixelBlue(image,p);
+ node_info->list[i].red=(double) GetPixelRed(image,p);
+ node_info->list[i].green=(double) GetPixelGreen(image,p);
+ node_info->list[i].blue=(double) GetPixelBlue(image,p);
if (image->colorspace == CMYKColorspace)
- node_info->list[i].black=GetPixelBlack(image,p);
- node_info->list[i].alpha=GetPixelAlpha(image,p);
+ node_info->list[i].black=(double) GetPixelBlack(image,p);
+ node_info->list[i].alpha=(double) GetPixelAlpha(image,p);
node_info->list[i].count=1;
node_info->number_unique++;
cube_info->colors++;
index=MaxTreeDepth-1;
for (level=1; level < MaxTreeDepth; level++)
{
- SetPixelInfo(image,p,&pixel);
+ GetPixelInfoPixel(image,p,&pixel);
id=ColorToNodeId(image,&pixel,index);
if (node_info->child[id] == (NodeInfo *) NULL)
{
image->filename);
break;
}
- node_info->list[i].red=GetPixelRed(image,p);
- node_info->list[i].green=GetPixelGreen(image,p);
- node_info->list[i].blue=GetPixelBlue(image,p);
+ node_info->list[i]=pixel;
+ node_info->list[i].red=(double) GetPixelRed(image,p);
+ node_info->list[i].green=(double) GetPixelGreen(image,p);
+ node_info->list[i].blue=(double) GetPixelBlue(image,p);
if (image->colorspace == CMYKColorspace)
- node_info->list[i].black=GetPixelBlack(image,p);
- node_info->list[i].alpha=GetPixelAlpha(image,p);
+ node_info->list[i].black=(double) GetPixelBlack(image,p);
+ node_info->list[i].alpha=(double) GetPixelAlpha(image,p);
node_info->list[i].count=1;
node_info->number_unique++;
cube_info->colors++;
ChannelType
channel_mask;
+ PixelChannel
+ channel;
+
PixelTrait
traits;
- traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+ channel=GetPixelChannelMapChannel(image,i);
+ traits=GetPixelChannelMapTraits(image,channel);
if ((traits & UpdatePixelTrait) == 0)
continue;
channel_mask=SetPixelChannelMask(image,(ChannelType) (1 << i));
(void) ConcatenateMagickString(tuple,")",MaxTextExtent);
(void) QueryColorname(image,&pixel,SVGCompliance,color,exception);
GetColorTuple(&pixel,MagickTrue,hex);
- (void) FormatLocaleFile(file,"%10" MagickSizeFormat,p->count);
+ (void) FormatLocaleFile(file,"%10.20g",(double) ((MagickOffsetType)
+ p->count));
(void) FormatLocaleFile(file,": %s %s %s\n",tuple,hex,color);
if (image->progress_monitor != (MagickProgressMonitor) NULL)
{
exception);
if (q == (Quantum *) NULL)
continue;
- SetPixelRed(unique_image,p->red,q);
- SetPixelGreen(unique_image,p->green,q);
- SetPixelBlue(unique_image,p->blue,q);
- SetPixelAlpha(unique_image,p->alpha,q);
+ SetPixelRed(unique_image,ClampToQuantum(p->red),q);
+ SetPixelGreen(unique_image,ClampToQuantum(p->green),q);
+ SetPixelBlue(unique_image,ClampToQuantum(p->blue),q);
+ SetPixelAlpha(unique_image,ClampToQuantum(p->alpha),q);
if (unique_image->colorspace == CMYKColorspace)
- SetPixelBlack(unique_image,p->black,q);
+ SetPixelBlack(unique_image,ClampToQuantum(p->black),q);
if (SyncCacheViewAuthenticPixels(unique_view,exception) == MagickFalse)
break;
cube_info->x++;