{
case UndefinedColorspace:
case sRGBColorspace:
- {
+ {
if (GetImageListLength(image) > 3)
combine_image->alpha_trait=BlendPixelTrait;
break;
break;
}
case CMYKColorspace:
- {
+ {
if (GetImageListLength(image) > 4)
combine_image->alpha_trait=BlendPixelTrait;
break;
{
double
gamma;
-
+
register ssize_t
i;
-
+
if (GetPixelReadMask(image,q) == 0)
{
q+=GetPixelChannels(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
double
- gamma,
+ gamma,
Sa;
register ssize_t
Shape alpha channel.
*/
image->alpha_trait=BlendPixelTrait;
- status=CompositeImage(image,image,IntensityCompositeOp,MagickTrue,0,0,
- exception);
- if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse)
- return(MagickFalse);
+ status=SetImageStorageClass(image,DirectClass,exception);
+ if (status == MagickFalse)
+ break;
ConformPixelInfo(image,&image->background_color,&background,exception);
- /*
- Set image background color.
- */
status=MagickTrue;
image_view=AcquireAuthenticCacheView(image,exception);
for (y=0; y < (ssize_t) image->rows; y++)
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetPixelAlpha(image,q) != TransparentAlpha)
+ if (GetPixelReadMask(image,q) == 0)
+ {
+ q+=GetPixelChannels(image);
+ continue;
+ }
+ if (fabs(GetPixelIntensity(image,q)) > MagickEpsilon)
SetPixelViaPixelInfo(image,&background,q);
q+=GetPixelChannels(image);
}