]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 9 Sep 2011 14:50:06 +0000 (14:50 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 9 Sep 2011 14:50:06 +0000 (14:50 +0000)
Magick++/lib/Image.cpp
MagickCore/effect.c
MagickCore/effect.h
MagickCore/fx.c
MagickCore/fx.h
MagickCore/magick-config.h
MagickCore/version.h
MagickWand/magick-image.c
MagickWand/magick-image.h
MagickWand/mogrify.c
PerlMagick/Magick.xs

index 35a6c3bb4f1ad1b750b3fad2ee2f5408b9f02729..7acb72447d033bf661c1594285d5cf56871a3e08 100644 (file)
@@ -1407,7 +1407,7 @@ void            Magick::Image::motionBlur ( const double radius_,
   ExceptionInfo exceptionInfo;
   GetExceptionInfo( &exceptionInfo );
   MagickCore::Image* newImage =
-    MotionBlurImage( image(), radius_, sigma_, angle_, &exceptionInfo);
+    MotionBlurImage( image(), radius_, sigma_, angle_, 0.0, &exceptionInfo);
   replaceImage( newImage );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
index ff462150b634d336310c92fb4b9ce27a54a670b2..dace1f17f90cea80966e3c69a42464bb7bf5c0f2 100644 (file)
@@ -2035,7 +2035,8 @@ MagickExport Image *GaussianBlurImage(const Image *image,const double radius,
 %  The format of the MotionBlurImage method is:
 %
 %    Image *MotionBlurImage(const Image *image,const double radius,
-%      const double sigma,const double angle,ExceptionInfo *exception)
+%      const double sigma,const double angle,const double bias,
+%      ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -2048,6 +2049,8 @@ MagickExport Image *GaussianBlurImage(const Image *image,const double radius,
 %
 %    o angle: Apply the effect along this angle.
 %
+%    o bias: the bias.
+%
 %    o exception: return any errors or warnings in this structure.
 %
 */
@@ -2081,7 +2084,8 @@ static double *GetMotionBlurKernel(const size_t width,const double sigma)
 }
 
 MagickExport Image *MotionBlurImage(const Image *image,const double radius,
-  const double sigma,const double angle,ExceptionInfo *exception)
+  const double sigma,const double angle,const double bias,
+  ExceptionInfo *exception)
 {
   CacheView
     *blur_view,
@@ -2099,9 +2103,6 @@ MagickExport Image *MotionBlurImage(const Image *image,const double radius,
   MagickOffsetType
     progress;
 
-  PixelInfo
-    bias;
-
   OffsetInfo
     *offset;
 
@@ -2158,7 +2159,6 @@ MagickExport Image *MotionBlurImage(const Image *image,const double radius,
   */
   status=MagickTrue;
   progress=0;
-  GetPixelInfo(image,&bias);
   image_view=AcquireCacheView(image);
   blur_view=AcquireCacheView(blur_image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
@@ -2166,6 +2166,9 @@ MagickExport Image *MotionBlurImage(const Image *image,const double radius,
 #endif
   for (y=0; y < (ssize_t) image->rows; y++)
   {
+    register const Quantum
+      *restrict p;
+
     register Quantum
       *restrict q;
 
@@ -2174,91 +2177,92 @@ MagickExport Image *MotionBlurImage(const Image *image,const double radius,
 
     if (status == MagickFalse)
       continue;
+    p=GetCacheViewVirtualPixels(blur_view,0,y,image->columns,1,exception);
     q=GetCacheViewAuthenticPixels(blur_view,0,y,blur_image->columns,1,
       exception);
-    if (q == (Quantum *) NULL)
+    if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
       {
         status=MagickFalse;
         continue;
       }
     for (x=0; x < (ssize_t) image->columns; x++)
     {
-      PixelInfo
-        qixel;
+      register ssize_t
+        i;
 
-      PixelPacket
-        pixel;
+      for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
+      {
+        MagickRealType
+          alpha,
+          gamma,
+          pixel;
 
-      register double
-        *restrict k;
+        PixelChannel
+          channel;
 
-      register ssize_t
-        i;
+        PixelTrait
+          blur_traits,
+          traits;
 
-      k=kernel;
-      qixel=bias;
-      if (((GetPixelAlphaTraits(image) & UpdatePixelTrait) == 0) ||
-          (image->matte == MagickFalse))
-        {
-          for (i=0; i < (ssize_t) width; i++)
+        register const Quantum
+          *restrict r;
+
+        register double
+          *restrict k;
+
+        register ssize_t
+          j;
+
+        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        blur_traits=GetPixelChannelMapTraits(blur_image,channel);
+        if ((traits == UndefinedPixelTrait) ||
+            (blur_traits == UndefinedPixelTrait))
+          continue;
+        if ((blur_traits & CopyPixelTrait) != 0)
           {
-            (void) GetOneCacheViewVirtualPixel(image_view,x+offset[i].x,y+
-              offset[i].y,&pixel,exception);
-            qixel.red+=(*k)*pixel.red;
-            qixel.green+=(*k)*pixel.green;
-            qixel.blue+=(*k)*pixel.blue;
-            qixel.alpha+=(*k)*pixel.alpha;
-            if (image->colorspace == CMYKColorspace)
-              qixel.black+=(*k)*pixel.black;
-            k++;
+            q[channel]=p[i];
+            continue;
           }
-          if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
-            SetPixelRed(blur_image,ClampToQuantum(qixel.red),q);
-          if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
-            SetPixelGreen(blur_image,ClampToQuantum(qixel.green),q);
-          if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
-            SetPixelBlue(blur_image,ClampToQuantum(qixel.blue),q);
-          if (((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
-              (image->colorspace == CMYKColorspace))
-            SetPixelBlack(blur_image,ClampToQuantum(qixel.black),q);
-          if ((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0)
-            SetPixelAlpha(blur_image,ClampToQuantum(qixel.alpha),q);
-        }
-      else
-        {
-          MagickRealType
-            alpha,
-            gamma;
-
-          alpha=0.0;
-          gamma=0.0;
-          for (i=0; i < (ssize_t) width; i++)
+        k=kernel;
+        pixel=bias;
+        if ((blur_traits & BlendPixelTrait) == 0)
           {
-            (void) GetOneCacheViewVirtualPixel(image_view,x+offset[i].x,y+
-              offset[i].y,&pixel,exception);
-            alpha=(MagickRealType) (QuantumScale*pixel.alpha);
-            qixel.red+=(*k)*alpha*pixel.red;
-            qixel.green+=(*k)*alpha*pixel.green;
-            qixel.blue+=(*k)*alpha*pixel.blue;
-            qixel.alpha+=(*k)*pixel.alpha;
-            if (image->colorspace == CMYKColorspace)
-              qixel.black+=(*k)*alpha*pixel.black;
-            gamma+=(*k)*alpha;
-            k++;
+            for (j=0; j < (ssize_t) width; j++)
+            {
+              r=GetCacheViewVirtualPixels(image_view,x+offset[j].x,y+
+                offset[j].y,1,1,exception);
+              if (r == (const Quantum *) NULL)
+                {
+                  status=MagickFalse;
+                  continue;
+                }
+              pixel+=(*k)*r[i];
+              k++;
+            }
+            q[channel]=ClampToQuantum(pixel);
+            continue;
           }
-          gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
-          if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
-            SetPixelRed(blur_image,ClampToQuantum(gamma*qixel.red),q);
-          if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
-            SetPixelGreen(blur_image,ClampToQuantum(gamma*qixel.green),q);
-          if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
-            SetPixelBlue(blur_image,ClampToQuantum(gamma*qixel.blue),q);
-          if (((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0) &&
-              (image->colorspace == CMYKColorspace))
-            SetPixelBlack(blur_image,ClampToQuantum(gamma*qixel.black),q);
-          if ((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0)
-            SetPixelAlpha(blur_image,ClampToQuantum(qixel.alpha),q);
+        alpha=0.0;
+        gamma=0.0;
+        for (j=0; j < (ssize_t) width; j++)
+        {
+          r=GetCacheViewVirtualPixels(image_view,x+offset[j].x,y+offset[j].y,1,
+            1,exception);
+          if (r == (const Quantum *) NULL)
+            {
+              status=MagickFalse;
+              continue;
+            }
+          alpha=(MagickRealType) (QuantumScale*GetPixelAlpha(image,r));
+          pixel+=(*k)*alpha*r[i];
+          gamma+=(*k)*alpha;
+          k++;
         }
+        gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
+        q[channel]=ClampToQuantum(gamma*pixel);
+      }
+      p+=GetPixelChannels(image);
       q+=GetPixelChannels(blur_image);
     }
     if (SyncCacheViewAuthenticPixels(blur_view,exception) == MagickFalse)
index cf30eb59aec4273d06f69c6343b5de1a4bd9c270..295d58e3ab2b582127697d27068e61acf7de086a 100644 (file)
@@ -85,7 +85,7 @@ extern MagickExport Image
   *GaussianBlurImage(const Image *,const double,const double,const double,
     ExceptionInfo *),
   *MotionBlurImage(const Image *,const double,const double,const double,
-    ExceptionInfo *),
+    const double,ExceptionInfo *),
   *PreviewImage(const Image *,const PreviewType,ExceptionInfo *),
   *RadialBlurImage(const Image *,const double,ExceptionInfo *),
   *SelectiveBlurImage(const Image *,const double,const double,const double,
index ff00a39a785563d5027990a0f4d64abd76535904..e979c1005c0b4e0989e574edc299d203cba1fc56 100644 (file)
@@ -4264,7 +4264,8 @@ MagickExport Image *ShadowImage(const Image *image,const double opacity,
 %  The format of the SketchImage method is:
 %
 %    Image *SketchImage(const Image *image,const double radius,
-%      const double sigma,const double angle,ExceptionInfo *exception)
+%      const double sigma,const double angle,const double bias,
+%      ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -4275,13 +4276,16 @@ MagickExport Image *ShadowImage(const Image *image,const double opacity,
 %
 %    o sigma: the standard deviation of the Gaussian, in pixels.
 %
-%    o angle: Apply the effect along this angle.
+%    o angle: apply the effect along this angle.
+%
+%    o bias: the bias.
 %
 %    o exception: return any errors or warnings in this structure.
 %
 */
 MagickExport Image *SketchImage(const Image *image,const double radius,
-  const double sigma,const double angle,ExceptionInfo *exception)
+  const double sigma,const double angle,const double bias,
+  ExceptionInfo *exception)
 {
   CacheView
     *random_view;
@@ -4364,7 +4368,7 @@ MagickExport Image *SketchImage(const Image *image,const double radius,
       random_image=DestroyImage(random_image);
       return(random_image);
     }
-  blur_image=MotionBlurImage(random_image,radius,sigma,angle,exception);
+  blur_image=MotionBlurImage(random_image,radius,sigma,angle,bias,exception);
   random_image=DestroyImage(random_image);
   if (blur_image == (Image *) NULL)
     return((Image *) NULL);
index 86e6ce2657f8ee97f3d052c90f0fe3196c0643cf..b2d7068222c6f57efc93dac7daba1a76d08abdbb 100644 (file)
@@ -51,7 +51,7 @@ extern MagickExport Image
   *ShadowImage(const Image *,const double,const double,const ssize_t,
     const ssize_t,ExceptionInfo *),
   *SketchImage(const Image *,const double,const double,const double,
-    ExceptionInfo *),
+    const double,ExceptionInfo *),
   *SteganoImage(const Image *,const Image *,ExceptionInfo *),
   *StereoImage(const Image *,const Image *,ExceptionInfo *),
   *StereoAnaglyphImage(const Image *,const Image *,const ssize_t,const ssize_t,
index 2726a74e3fde3f0f6dab78f556afb7ba2dc5a8c6..efe979e75ca7136759a424b1ae1174f741e4cb93 100644 (file)
@@ -12,7 +12,9 @@
 /* #undef AUTOTRACE_DELEGATE */
 
 /* Define if coders and filters are to be built as modules. */
-/* #undef BUILD_MODULES */
+#ifndef MAGICKCORE_BUILD_MODULES
+#define MAGICKCORE_BUILD_MODULES 1
+#endif
 
 /* Define if you have the bzip2 library */
 #ifndef MAGICKCORE_BZLIB_DELEGATE
@@ -78,7 +80,9 @@
 #endif
 
 /* Define if you have FFTW library */
-/* #undef FFTW_DELEGATE */
+#ifndef MAGICKCORE_FFTW_DELEGATE
+#define MAGICKCORE_FFTW_DELEGATE 1
+#endif
 
 /* Location of filter modules */
 #ifndef MAGICKCORE_FILTER_PATH
 
 /* Define to the system default library search path. */
 #ifndef MAGICKCORE_LT_DLSEARCH_PATH
-#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib/llvm:/usr/lib64/llvm:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
+#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/alliance/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/usr/lib64/kicad:/usr/lib/llvm:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mpich2/lib/:/usr/lib64/mysql:/usr/lib64/octave/3.4.2:/usr/lib64/openmotif:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
 #endif
 
 /* The archive extension */
 /* #undef NO_MINUS_C_MINUS_O */
 
 /* Define if you have OPENEXR library */
-/* #undef OPENEXR_DELEGATE */
+#ifndef MAGICKCORE_OPENEXR_DELEGATE
+#define MAGICKCORE_OPENEXR_DELEGATE 1
+#endif
 
 /* Define to the address where bug reports for this package should be sent. */
 #ifndef MAGICKCORE_PACKAGE_BUGREPORT
 #endif
 
 /* Define if you have RSVG library */
-/* #undef RSVG_DELEGATE */
+#ifndef MAGICKCORE_RSVG_DELEGATE
+#define MAGICKCORE_RSVG_DELEGATE 1
+#endif
 
 /* Define to the type of arg 1 for `select'. */
 #ifndef MAGICKCORE_SELECT_TYPE_ARG1
 /* #undef WITH_DMALLOC */
 
 /* Define if you have WMF library */
-/* #undef WMF_DELEGATE */
+#ifndef MAGICKCORE_WMF_DELEGATE
+#define MAGICKCORE_WMF_DELEGATE 1
+#endif
 
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel). */
index 218e4043427f7063de22ca0dcc55572965bb878c..b5c78d050945c93efc64a3e6c2df1bbb328a1377 100644 (file)
@@ -27,14 +27,14 @@ extern "C" {
 */
 #define MagickPackageName "ImageMagick"
 #define MagickCopyright  "Copyright (C) 1999-2011 ImageMagick Studio LLC"
-#define MagickSVNRevision  "5221"
+#define MagickSVNRevision  "exported"
 #define MagickLibVersion  0x700
 #define MagickLibVersionText  "7.0.0"
 #define MagickLibVersionNumber  5,0,0
 #define MagickLibAddendum  "-0"
 #define MagickLibInterface  5
 #define MagickLibMinInterface  5
-#define MagickReleaseDate  "2011-09-08"
+#define MagickReleaseDate  "2011-09-09"
 #define MagickChangeDate   "20110801"
 #define MagickAuthoritativeURL  "http://www.imagemagick.org"
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
index bcbf026b662d868d9789d8da11487225aa67270d..a0a1fe31bd202adbcf53256a1e2cb712cb71cafe 100644 (file)
@@ -6570,7 +6570,8 @@ WandExport MagickBooleanType MagickMorphologyImage(MagickWand *wand,
 %  The format of the MagickMotionBlurImage method is:
 %
 %      MagickBooleanType MagickMotionBlurImage(MagickWand *wand,
-%        const double radius,const double sigma,const double angle)
+%        const double radius,const double sigma,const double angle,
+%        const double bias)
 %
 %  A description of each parameter follows:
 %
@@ -6585,7 +6586,7 @@ WandExport MagickBooleanType MagickMorphologyImage(MagickWand *wand,
 %
 */
 WandExport MagickBooleanType MagickMotionBlurImage(MagickWand *wand,
-  const double radius,const double sigma,const double angle)
+  const double radius,const double sigma,const double angle,const double bias)
 {
   Image
     *blur_image;
@@ -6596,7 +6597,8 @@ WandExport MagickBooleanType MagickMotionBlurImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  blur_image=MotionBlurImage(wand->images,radius,sigma,angle,wand->exception);
+  blur_image=MotionBlurImage(wand->images,radius,sigma,angle,bias,
+    wand->exception);
   if (blur_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,blur_image);
@@ -10503,7 +10505,8 @@ WandExport MagickWand *MagickSimilarityImage(MagickWand *wand,
 %  The format of the MagickSketchImage method is:
 %
 %      MagickBooleanType MagickSketchImage(MagickWand *wand,
-%        const double radius,const double sigma,const double angle)
+%        const double radius,const double sigma,const double angle,
+%        const double bias)
 %
 %  A description of each parameter follows:
 %
@@ -10514,11 +10517,13 @@ WandExport MagickWand *MagickSimilarityImage(MagickWand *wand,
 %
 %    o sigma: the standard deviation of the Gaussian, in pixels.
 %
-%    o angle: Apply the effect along this angle.
+%    o angle: apply the effect along this angle.
+%
+%    o bias: the bias.
 %
 */
 WandExport MagickBooleanType MagickSketchImage(MagickWand *wand,
-  const double radius,const double sigma,const double angle)
+  const double radius,const double sigma,const double angle,const double bias)
 {
   Image
     *sketch_image;
@@ -10529,7 +10534,8 @@ WandExport MagickBooleanType MagickSketchImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  sketch_image=SketchImage(wand->images,radius,sigma,angle,wand->exception);
+  sketch_image=SketchImage(wand->images,radius,sigma,angle,bias,
+    wand->exception);
   if (sketch_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,sketch_image);
index 95ae5f51bd472019484945b75fde89f63687ad03..b89e6eb4397a1d6b230ec3379402b312aaabec13 100644 (file)
@@ -181,7 +181,8 @@ extern WandExport MagickBooleanType
   MagickModulateImage(MagickWand *,const double,const double,const double),
   MagickMorphologyImage(MagickWand *,MorphologyMethod,const ssize_t,
     KernelInfo *),
-  MagickMotionBlurImage(MagickWand *,const double,const double,const double),
+  MagickMotionBlurImage(MagickWand *,const double,const double,const double,
+    const double),
   MagickNegateImage(MagickWand *,const MagickBooleanType),
   MagickNewImage(MagickWand *,const size_t,const size_t,const PixelWand *),
   MagickNextImage(MagickWand *),
@@ -276,7 +277,8 @@ extern WandExport MagickBooleanType
   MagickShearImage(MagickWand *,const PixelWand *,const double,const double),
   MagickSigmoidalContrastImage(MagickWand *,const MagickBooleanType,
     const double,const double),
-  MagickSketchImage(MagickWand *,const double,const double,const double),
+  MagickSketchImage(MagickWand *,const double,const double,const double,
+    const double),
   MagickSolarizeImage(MagickWand *,const double),
   MagickSparseColorImage(MagickWand *,const SparseColorMethod,const size_t,
     const double *),
index 4c16c93826d7258a3b7fdd0b7b819e605f4b66ea..0120b22aa3f38cdc5a2c63eb49e75598bf31ed9f 100644 (file)
@@ -2122,7 +2122,8 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             if ((flags & SigmaValue) == 0)
               geometry_info.sigma=1.0;
             mogrify_image=MotionBlurImage(*image,geometry_info.rho,
-              geometry_info.sigma,geometry_info.xi,exception);
+              geometry_info.sigma,geometry_info.xi,geometry_info.psi,
+              exception);
             break;
           }
         break;
@@ -2734,7 +2735,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             if ((flags & SigmaValue) == 0)
               geometry_info.sigma=1.0;
             mogrify_image=SketchImage(*image,geometry_info.rho,
-              geometry_info.sigma,geometry_info.xi,exception);
+              geometry_info.sigma,geometry_info.xi,geometry_info.psi,exception);
             break;
           }
         if (LocaleCompare("solarize",option+1) == 0)
index 0e245ef50a7e0d43c56e01982a59a5a8a3507f3b..82ebb9abed874caec0523d82df2392ecd81d0d0d 100644 (file)
@@ -395,7 +395,8 @@ static struct
       {"channel", MagickChannelOptions} } },
     { "MotionBlur", { {"geometry", StringReference},
       {"radius", RealReference}, {"sigma", RealReference},
-      {"angle", RealReference}, {"channel", MagickChannelOptions} } },
+      {"angle", RealReference}, {"bias", RealReference},
+      {"channel", MagickChannelOptions} } },
     { "OrderedDither", { {"threshold", StringReference},
       {"channel", MagickChannelOptions} } },
     { "Shave", { {"geometry", StringReference}, {"width", IntegerReference},
@@ -466,7 +467,7 @@ static struct
       {"bias", RealReference}, {"channel", MagickChannelOptions} } },
     { "Sketch", { {"geometry", StringReference},
       {"radius", RealReference}, {"sigma", RealReference},
-      {"angle", RealReference} } },
+      {"angle", RealReference}, {"bias", RealReference} } },
     { "UniqueColors", },
     { "AdaptiveResize", { {"geometry", StringReference},
       {"width", IntegerReference}, {"height", IntegerReference},
@@ -9311,10 +9312,12 @@ Mogrify(ref,...)
           if (attribute_flag[3] != 0)
             geometry_info.xi=argument_list[3].real_reference;
           if (attribute_flag[4] != 0)
-            channel=(ChannelType) argument_list[4].integer_reference;
+            geometry_info.psi=argument_list[4].real_reference;
+          if (attribute_flag[5] != 0)
+            channel=(ChannelType) argument_list[5].integer_reference;
           channel_mask=SetPixelChannelMask(image,channel);
           image=MotionBlurImage(image,geometry_info.rho,geometry_info.sigma,
-            geometry_info.xi,exception);
+            geometry_info.xi,geometry_info.psi,exception);
           if (image != (Image *) NULL)
             (void) SetPixelChannelMask(image,channel_mask);
           break;
@@ -10026,8 +10029,10 @@ Mogrify(ref,...)
             geometry_info.sigma=argument_list[2].real_reference;
           if (attribute_flag[3] != 0)
             geometry_info.xi=argument_list[3].real_reference;
+          if (attribute_flag[4] != 0)
+            geometry_info.psi=argument_list[4].real_reference;
           image=SketchImage(image,geometry_info.rho,geometry_info.sigma,
-            geometry_info.xi,exception);
+            geometry_info.xi,geometry_info.psi,exception);
           break;
         }
         case 104:  /* UniqueColors */