MagickBooleanType
associate_alpha;
- associate_alpha=image->matte;
+ associate_alpha=image->alpha_trait == BlendPixelTrait ? MagickTrue :
+ MagickFalse;
if (cube_info->quantize_info->colorspace == TransparentColorspace)
associate_alpha=MagickFalse;
if ((cube_info->quantize_info->number_colors == 2) &&
for (x=0; x < (ssize_t) image->columns; x++)
{
index=1UL*GetPixelIndex(image,p);
- if (image->matte != MagickFalse)
+ if (image->alpha_trait == BlendPixelTrait)
{
alpha=(double) (QuantumScale*GetPixelAlpha(image,p));
beta=(double) (QuantumScale*image->colormap[index].alpha);
(image->colorspace == CMYKColorspace))
SetPixelBlack(image,PosterizePixel(GetPixelBlack(image,q)),q);
if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) &&
- (image->matte == MagickTrue))
+ (image->alpha_trait == BlendPixelTrait))
SetPixelAlpha(image,PosterizePixel(GetPixelAlpha(image,q)),q);
q+=GetPixelChannels(image);
}
maximum_colors=MaxColormapSize;
if (maximum_colors > MaxColormapSize)
maximum_colors=MaxColormapSize;
- if ((image->columns*image->rows) <= maximum_colors)
- (void) DirectToColormapImage(image,exception);
- if ((IsImageGray(image,exception) != MagickFalse) &&
- (image->matte == MagickFalse))
- (void) SetGrayscaleImage(image,exception);
+ if (image->alpha_trait != BlendPixelTrait)
+ {
+ if ((image->columns*image->rows) <= maximum_colors)
+ (void) DirectToColormapImage(image,exception);
+ if (IsImageGray(image,exception) != MagickFalse)
+ (void) SetGrayscaleImage(image,exception);
+ }
if ((image->storage_class == PseudoClass) &&
(image->colors <= maximum_colors))
return(MagickTrue);
colors>>=2;
if ((quantize_info->dither_method != NoDitherMethod) && (depth > 2))
depth--;
- if ((image->matte != MagickFalse) && (depth > 5))
+ if ((image->alpha_trait == BlendPixelTrait) && (depth > 5))
depth--;
}
/*
image->colors++;
}
}
- SetPixelIndex(image,(Quantum)
- colormap_index[intensity],q);
+ SetPixelIndex(image,(Quantum) colormap_index[intensity],q);
q+=GetPixelChannels(image);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)