]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 27 Dec 2011 01:40:49 +0000 (01:40 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 27 Dec 2011 01:40:49 +0000 (01:40 +0000)
MagickCore/display.c

index 263f605b4b28370ecf437f7d2aa10c968038f161..a8a06784ac5a35bc1088c74fc891ba14d24aba32 100644 (file)
@@ -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 ?