]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 7 Feb 2012 12:14:15 +0000 (12:14 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 7 Feb 2012 12:14:15 +0000 (12:14 +0000)
MagickCore/distort.c
PerlMagick/Magick.xs

index a2509605422354cbf15fb4422c059dc575914ec8..7ba1ebdf7a70e49eaffe6bdfbc5c4275e6e4eb63 100644 (file)
@@ -2823,6 +2823,9 @@ MagickExport Image *RotateImage(const Image *image,const double degrees,
   shear.y=sin((double) DegreesToRadians(angle));
   if ((fabs(shear.x) < MagickEpsilon) && (fabs(shear.y) < MagickEpsilon))
     return(IntegralRotateImage(image,rotations,exception));
+  if ((image->background_color.matte != MagickFalse) &&
+      (image->matte == MagickFalse))
+    (void) SetImageAlpha(image,OpaqueAlpha,exception);
   method=SetImageVirtualPixelMethod(image,BackgroundVirtualPixelMethod);
   rotate_image=DistortImage(image,ScaleRotateTranslateDistortion,1,&degrees,
     MagickTrue,exception);
index cdf22dce405b1e44404b5dd82684452f4d9e43e0..5cc09da8969cb2df7603f05f61bbaa4f5986bc50 100644 (file)
@@ -7824,13 +7824,8 @@ Mogrify(ref,...)
           if (attribute_flag[0] == 0)
             argument_list[0].real_reference=90.0;
           if (attribute_flag[1] != 0)
-            {
-              QueryColorCompliance(argument_list[1].string_reference,
-                AllCompliance,&image->background_color,exception);
-              if ((image->background_color.matte != MagickFalse) &&
-                  (image->matte == MagickFalse))
-                (void) SetImageAlpha(image,OpaqueAlpha,exception);
-            }
+            QueryColorCompliance(argument_list[1].string_reference,
+              AllCompliance,&image->background_color,exception);
           image=RotateImage(image,argument_list[0].real_reference,exception);
           break;
         }