]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 16 Feb 2013 14:35:29 +0000 (14:35 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 16 Feb 2013 14:35:29 +0000 (14:35 +0000)
MagickCore/image.c

index 7e877c85911615f87472ef6e63cfdb9cfed54bc5..90ec1d08d938d488db0666a8ae92812a899d8519 100644 (file)
@@ -2204,7 +2204,10 @@ MagickExport MagickBooleanType SetImageAlphaChannel(Image *image,
         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)
@@ -2235,7 +2238,7 @@ MagickExport MagickBooleanType SetImageAlphaChannel(Image *image,
     {
       status=CompositeImage(image,image,AlphaCompositeOp,MagickTrue,0,0,
         exception);
-      image->alpha_trait=UndefinedPixelTrait;
+      image->alpha_trait=CopyPixelTrait;
       break;
     }
     case OpaqueAlphaChannel: