]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 16 Nov 2014 00:20:47 +0000 (00:20 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 16 Nov 2014 00:20:47 +0000 (00:20 +0000)
MagickCore/annotate.c

index 1316c8cd1e8b8a3b7345f6d709e0f85cb4e88fb8..13a813c882ca48e59bd1f3d708d77543086c6381 100644 (file)
@@ -1293,7 +1293,13 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info,
       if (image->storage_class != DirectClass)
         (void) SetImageStorageClass(image,DirectClass,exception);
       if (image->alpha_trait == UndefinedPixelTrait)
-        (void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
+        if ((draw_info->fill.alpha != OpaqueAlpha) ||
+            ((draw_info->fill_pattern != (Image *) NULL) &&
+             (draw_info->fill_pattern->alpha_trait != UndefinedPixelTrait)) ||
+            (draw_info->stroke.alpha != TransparentAlpha) ||
+            ((draw_info->stroke_pattern != (Image *) NULL) &&
+             (draw_info->stroke_pattern->alpha_trait != UndefinedPixelTrait)))
+         (void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
     }
   direction=1.0;
   if (draw_info->direction == RightToLeftDirection)