From cd5152826fb5b87065fcc614d19c70be8ac5a557 Mon Sep 17 00:00:00 2001 From: cristy Date: Tue, 27 Dec 2011 01:40:49 +0000 Subject: [PATCH] --- MagickCore/display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MagickCore/display.c b/MagickCore/display.c index 263f605b4..a8a06784a 100644 --- a/MagickCore/display.c +++ b/MagickCore/display.c @@ -10099,7 +10099,8 @@ static MagickBooleanType XMatteEditImage(Display *display, continue; if (SetImageStorageClass(*image,DirectClass,exception) == MagickFalse) return(MagickFalse); - (*image)->matte=MagickTrue; + if ((*image)->matte == MagickFalse) + (void) SetImageAlphaChannel(*image,OpaqueAlphaChannel,exception); image_view=AcquireCacheView(*image); switch (method) { @@ -10184,7 +10185,6 @@ static MagickBooleanType XMatteEditImage(Display *display, (DrawInfo *) NULL); draw_info->fill.alpha=ClampToQuantum(StringToDouble(matte, (char **) NULL)); - (void) SetImageAlphaChannel(*image,OpaqueAlphaChannel,exception); channel_mask=SetPixelChannelMask(*image,AlphaChannel); (void) FloodfillPaintImage(*image,draw_info,&target,(ssize_t) x_offset,(ssize_t) y_offset,method == FloodfillMethod ? -- 2.40.0