*append_image;
MagickBooleanType
- proceed,
status;
MagickOffsetType
Image
*image;
+ MagickBooleanType
+ proceed;
+
image=CloneImage(next,0,0,MagickTrue,exception);
if (image == (Image *) NULL)
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
if (GetPixelAlpha(image,q) == TransparentAlpha)
- SetPixelInfoPixel(image,&image->background_color,q);
+ {
+ SetPixelInfoPixel(image,&image->background_color,q);
+ SetPixelChannel(image,AlphaPixelChannel,TransparentAlpha,q);
+ }
q+=GetPixelChannels(image);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
{
status=CompositeImage(image,image,AlphaCompositeOp,MagickTrue,0,0,
exception);
- image->alpha_trait=UndefinedPixelTrait;
+ image->alpha_trait=CopyPixelTrait;
break;
}
case OpaqueAlphaChannel:
return(MagickFalse);
if ((IsPixelInfoGray(&image->background_color) == MagickFalse) &&
(IsGrayColorspace(image->colorspace) != MagickFalse))
- (void) TransformImageColorspace(image,RGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if ((image->background_color.alpha_trait == BlendPixelTrait) &&
(image->alpha_trait != BlendPixelTrait))
(void) SetImageAlpha(image,OpaqueAlpha,exception);
if (mask == (const Image *) NULL)
{
image->mask=MagickFalse;
- return(MagickTrue);
+ return(SyncImagePixelCache(image,exception));
}
- status=MagickTrue;
image->mask=MagickTrue;
+ if (SyncImagePixelCache(image,exception) == MagickFalse)
+ return(MagickFalse);
+ status=MagickTrue;
mask_view=AcquireVirtualCacheView(mask,exception);
image_view=AcquireAuthenticCacheView(image,exception);
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp parallel for schedule(static,4) shared(status) \
+ magick_threads(mask,image,1,1)
+#endif
for (y=0; y < (ssize_t) image->rows; y++)
{
register const Quantum
}
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelMask(image,GetPixelGray(mask,p),q);
+ SetPixelMask(image,ClampToQuantum(GetPixelIntensity(mask,p)),q);
p+=GetPixelChannels(mask);
q+=GetPixelChannels(image);
}