*artifact;
Image
+ *clone_image,
*difference_image,
*highlight_image;
PixelInfo
highlight,
- lowlight;
+ lowlight,
+ masklight;
RectangleInfo
geometry;
SetGeometry(image,&geometry);
geometry.width=columns;
geometry.height=rows;
- difference_image=ExtentImage(image,&geometry,exception);
+ clone_image=CloneImage(image,0,0,MagickTrue,exception);
+ if (clone_image == (Image *) NULL)
+ return((Image *) NULL);
+ (void) SetImageMask(clone_image,ReadPixelMask,(Image *) NULL,exception);
+ difference_image=ExtentImage(clone_image,&geometry,exception);
+ clone_image=DestroyImage(clone_image);
if (difference_image == (Image *) NULL)
return((Image *) NULL);
(void) SetImageAlphaChannel(difference_image,OpaqueAlphaChannel,exception);
difference_image=DestroyImage(difference_image);
return((Image *) NULL);
}
+ (void) SetImageMask(highlight_image,ReadPixelMask,(Image *) NULL,exception);
status=SetImageStorageClass(highlight_image,DirectClass,exception);
if (status == MagickFalse)
{
highlight_image=DestroyImage(highlight_image);
return((Image *) NULL);
}
- (void) SetImageMask(difference_image,ReadPixelMask,(Image *) NULL,exception);
- (void) SetImageMask(highlight_image,ReadPixelMask,(Image *) NULL,exception);
(void) SetImageAlphaChannel(highlight_image,OpaqueAlphaChannel,exception);
(void) QueryColorCompliance("#f1001ecc",AllCompliance,&highlight,exception);
artifact=GetImageArtifact(image,"highlight-color");
artifact=GetImageArtifact(image,"lowlight-color");
if (artifact != (const char *) NULL)
(void) QueryColorCompliance(artifact,AllCompliance,&lowlight,exception);
+ masklight=lowlight;
+ masklight.alpha=(MagickRealType) TransparentAlpha;
/*
Generate difference image.
*/
if (GetPixelReadMask(image,p) == 0)
{
- SetPixelViaPixelInfo(highlight_image,&lowlight,r);
+ SetPixelViaPixelInfo(highlight_image,&masklight,r);
p+=GetPixelChannels(image);
q+=GetPixelChannels(reconstruct_image);
r+=GetPixelChannels(highlight_image);