]> granicus.if.org Git - imagemagick/commitdiff
Fixed refactor issue in VignetteImage.
authorDirk Lemstra <dirk@git.imagemagick.org>
Sun, 30 Jul 2017 14:45:19 +0000 (16:45 +0200)
committerDirk Lemstra <dirk@git.imagemagick.org>
Sun, 30 Jul 2017 14:47:15 +0000 (16:47 +0200)
MagickCore/fx.c

index 9a91a31796b9df4fc6d4a983a5631db693bcdcb9..881ec6a2e9ca16367805af702f50519039571734 100644 (file)
@@ -5537,14 +5537,12 @@ MagickExport Image *VignetteImage(const Image *image,const double radius,
   canvas=CloneImage(image,0,0,MagickTrue,exception);
   if (canvas == (Image *) NULL)
     return((Image *) NULL);
-  if ((canvas->alpha_trait == UndefinedPixelTrait) &&
-      (canvas->background_color.alpha != OpaqueAlpha))
-    (void) SetImageAlphaChannel(canvas,OpaqueAlphaChannel,exception);
   if (SetImageStorageClass(canvas,DirectClass,exception) == MagickFalse)
     {
       canvas=DestroyImage(canvas);
       return((Image *) NULL);
     }
+  canvas->alpha_trait=BlendPixelTrait;
   oval_image=CloneImage(canvas,canvas->columns,canvas->rows,MagickTrue,
     exception);
   if (oval_image == (Image *) NULL)