]> granicus.if.org Git - imagemagick/blobdiff - MagickWand/magick-image.c
(no commit message)
[imagemagick] / MagickWand / magick-image.c
index 4582b6cb73730d5bbb5053625f9c47b4d162c9af..a08c00c730ad4397f5525c2b3056590ba738763f 100644 (file)
@@ -177,7 +177,7 @@ WandExport Image *GetImageFromMagickWand(const MagickWand *wand)
 %  The format of the MagickAdaptiveBlurImage method is:
 %
 %      MagickBooleanType MagickAdaptiveBlurImage(MagickWand *wand,
-%        const double radius,const double sigma)
+%        const double radius,const double sigma,const double bias)
 %
 %  A description of each parameter follows:
 %
@@ -188,9 +188,11 @@ WandExport Image *GetImageFromMagickWand(const MagickWand *wand)
 %
 %    o sigma: the standard deviation of the Gaussian, in pixels.
 %
+%    o bias: the bias.
+%
 */
 WandExport MagickBooleanType MagickAdaptiveBlurImage(MagickWand *wand,
-  const double radius,const double sigma)
+  const double radius,const double sigma,const double bias)
 {
   Image
     *sharp_image;
@@ -201,7 +203,7 @@ WandExport MagickBooleanType MagickAdaptiveBlurImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  sharp_image=AdaptiveBlurImage(wand->images,radius,sigma,wand->exception);
+  sharp_image=AdaptiveBlurImage(wand->images,radius,sigma,bias,wand->exception);
   if (sharp_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,sharp_image);
@@ -223,7 +225,8 @@ WandExport MagickBooleanType MagickAdaptiveBlurImage(MagickWand *wand,
 %  triangulation.
 %
 %      MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
-%        const size_t columns,const size_t rows)
+%        const size_t columns,const size_t rows,
+%        const PixelInterpolateMethod method)
 %
 %  A description of each parameter follows:
 %
@@ -233,9 +236,11 @@ WandExport MagickBooleanType MagickAdaptiveBlurImage(MagickWand *wand,
 %
 %    o rows: the number of rows in the scaled image.
 %
+%    o interpolate: the pixel interpolation method.
+%
 */
 WandExport MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
-  const size_t columns,const size_t rows)
+  const size_t columns,const size_t rows,const PixelInterpolateMethod method)
 {
   Image
     *resize_image;
@@ -246,7 +251,8 @@ WandExport MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  resize_image=AdaptiveResizeImage(wand->images,columns,rows,wand->exception);
+  resize_image=AdaptiveResizeImage(wand->images,columns,rows,method,
+    wand->exception);
   if (resize_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,resize_image);
@@ -274,7 +280,7 @@ WandExport MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
 %  The format of the MagickAdaptiveSharpenImage method is:
 %
 %      MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *wand,
-%        const double radius,const double sigma)
+%        const double radius,const double sigma,const double bias)
 %
 %  A description of each parameter follows:
 %
@@ -285,9 +291,11 @@ WandExport MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
 %
 %    o sigma: the standard deviation of the Gaussian, in pixels.
 %
+%    o bias: the bias.
+%
 */
 WandExport MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *wand,
-  const double radius,const double sigma)
+  const double radius,const double sigma,const double bias)
 {
   Image
     *sharp_image;
@@ -298,7 +306,8 @@ WandExport MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  sharp_image=AdaptiveSharpenImage(wand->images,radius,sigma,wand->exception);
+  sharp_image=AdaptiveSharpenImage(wand->images,radius,sigma,bias,
+    wand->exception);
   if (sharp_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,sharp_image);
@@ -603,10 +612,8 @@ WandExport MagickBooleanType MagickAnnotateImage(MagickWand *wand,
   draw_info->affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
   draw_info->affine.sy=cos(DegreesToRadians(fmod(angle,360.0)));
   (void) CloneString(&draw_info->geometry,geometry);
-  status=AnnotateImage(wand->images,draw_info);
+  status=AnnotateImage(wand->images,draw_info,&wand->images->exception);
   draw_info=DestroyDrawInfo(draw_info);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
   return(status);
 }
 \f
@@ -646,9 +653,7 @@ WandExport MagickBooleanType MagickAnimateImages(MagickWand *wand,
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   (void) CloneString(&wand->image_info->server_name,server_name);
-  status=AnimateImages(wand->image_info,wand->images);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=AnimateImages(wand->image_info,wand->images,&wand->images->exception);
   return(status);
 }
 \f
@@ -730,9 +735,7 @@ WandExport MagickBooleanType MagickAutoGammaImage(MagickWand *wand)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=AutoGammaImage(wand->images);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=AutoGammaImage(wand->images,&wand->images->exception);
   return(status);
 }
 \f
@@ -770,9 +773,7 @@ WandExport MagickBooleanType MagickAutoLevelImage(MagickWand *wand)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=AutoLevelImage(wand->images);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=AutoLevelImage(wand->images,&wand->images->exception);
   return(status);
 }
 \f
@@ -892,7 +893,7 @@ WandExport MagickBooleanType MagickBlueShiftImage(MagickWand *wand,
 %  The format of the MagickBlurImage method is:
 %
 %      MagickBooleanType MagickBlurImage(MagickWand *wand,const double radius,
-%        const double sigma)
+%        const double sigmaconst double bias)
 %
 %  A description of each parameter follows:
 %
@@ -903,9 +904,11 @@ WandExport MagickBooleanType MagickBlueShiftImage(MagickWand *wand,
 %
 %    o sigma: the standard deviation of the , in pixels.
 %
+%    o bias: the bias.
+%
 */
 WandExport MagickBooleanType MagickBlurImage(MagickWand *wand,
-  const double radius,const double sigma)
+  const double radius,const double sigma,const double bias)
 {
   Image
     *blur_image;
@@ -916,7 +919,7 @@ WandExport MagickBooleanType MagickBlurImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  blur_image=BlurImage(wand->images,radius,sigma,wand->exception);
+  blur_image=BlurImage(wand->images,radius,sigma,bias,wand->exception);
   if (blur_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,blur_image);
@@ -1024,9 +1027,8 @@ WandExport MagickBooleanType MagickBrightnessContrastImage(
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=BrightnessContrastImage(wand->images,brightness,contrast);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=BrightnessContrastImage(wand->images,brightness,contrast,
+    &wand->images->exception);
   return(status);
 }
 \f
@@ -1046,7 +1048,7 @@ WandExport MagickBooleanType MagickBrightnessContrastImage(
 %  The format of the MagickCharcoalImage method is:
 %
 %      MagickBooleanType MagickCharcoalImage(MagickWand *wand,
-%        const double radius,const double sigma)
+%        const double radius,const double sigma,const double bias)
 %
 %  A description of each parameter follows:
 %
@@ -1057,9 +1059,11 @@ WandExport MagickBooleanType MagickBrightnessContrastImage(
 %
 %    o sigma: the standard deviation of the Gaussian, in pixels.
 %
+%    o bias: the bias.
+%
 */
 WandExport MagickBooleanType MagickCharcoalImage(MagickWand *wand,
-  const double radius,const double sigma)
+  const double radius,const double sigma,const double bias)
 {
   Image
     *charcoal_image;
@@ -1070,7 +1074,7 @@ WandExport MagickBooleanType MagickCharcoalImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  charcoal_image=CharcoalImage(wand->images,radius,sigma,wand->exception);
+  charcoal_image=CharcoalImage(wand->images,radius,sigma,bias,wand->exception);
   if (charcoal_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,charcoal_image);
@@ -1213,9 +1217,7 @@ WandExport MagickBooleanType MagickClipImage(MagickWand *wand)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=ClipImage(wand->images);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=ClipImage(wand->images,wand->exception);
   return(status);
 }
 \f
@@ -1263,9 +1265,7 @@ WandExport MagickBooleanType MagickClipImagePath(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=ClipImagePath(wand->images,pathname,inside);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=ClipImagePath(wand->images,pathname,inside,wand->exception);
   return(status);
 }
 \f
@@ -1285,7 +1285,7 @@ WandExport MagickBooleanType MagickClipImagePath(MagickWand *wand,
 %  The format of the MagickClutImage method is:
 %
 %      MagickBooleanType MagickClutImage(MagickWand *wand,
-%        const MagickWand *clut_wand)
+%        const MagickWand *clut_wand,const PixelInterpolateMethod method)
 %
 %  A description of each parameter follows:
 %
@@ -1293,9 +1293,11 @@ WandExport MagickBooleanType MagickClipImagePath(MagickWand *wand,
 %
 %    o clut_image: the clut image.
 %
+%    o method: the pixel interpolation method.
+%
 */
 WandExport MagickBooleanType MagickClutImage(MagickWand *wand,
-  const MagickWand *clut_wand)
+  const MagickWand *clut_wand,const PixelInterpolateMethod method)
 {
   MagickBooleanType
     status;
@@ -1306,9 +1308,7 @@ WandExport MagickBooleanType MagickClutImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if ((wand->images == (Image *) NULL) || (clut_wand->images == (Image *) NULL))
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=ClutImage(wand->images,clut_wand->images);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=ClutImage(wand->images,clut_wand->images,method,wand->exception);
   return(status);
 }
 \f
@@ -1411,9 +1411,8 @@ WandExport MagickBooleanType MagickColorDecisionListImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=ColorDecisionListImage(wand->images,color_correction_collection);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=ColorDecisionListImage(wand->images,color_correction_collection,
+    &wand->images->exception);
   return(status);
 }
 \f
@@ -1814,9 +1813,7 @@ WandExport MagickBooleanType MagickContrastImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=ContrastImage(wand->images,sharpen);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=ContrastImage(wand->images,sharpen,&wand->images->exception);
   return(status);
 }
 \f
@@ -1862,9 +1859,8 @@ WandExport MagickBooleanType MagickContrastStretchImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=ContrastStretchImage(wand->images,black_point,white_point);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=ContrastStretchImage(wand->images,black_point,white_point,
+    &wand->images->exception);
   return(status);
 }
 \f
@@ -2010,9 +2006,7 @@ WandExport MagickBooleanType MagickCycleColormapImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=CycleColormapImage(wand->images,displace);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=CycleColormapImage(wand->images,displace,wand->exception);
   return(status);
 }
 \f
@@ -2324,9 +2318,7 @@ WandExport MagickBooleanType MagickDisplayImage(MagickWand *wand,
   if (image == (Image *) NULL)
     return(MagickFalse);
   (void) CloneString(&wand->image_info->server_name,server_name);
-  status=DisplayImages(wand->image_info,image);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&image->exception);
+  status=DisplayImages(wand->image_info,image,&image->exception);
   image=DestroyImage(image);
   return(status);
 }
@@ -2367,9 +2359,7 @@ WandExport MagickBooleanType MagickDisplayImages(MagickWand *wand,
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   (void) CloneString(&wand->image_info->server_name,server_name);
-  status=DisplayImages(wand->image_info,wand->images);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=DisplayImages(wand->image_info,wand->images,&wand->images->exception);
   return(status);
 }
 \f
@@ -2505,9 +2495,7 @@ WandExport MagickBooleanType MagickDrawImage(MagickWand *wand,
   draw_info=DestroyDrawInfo(draw_info);
   draw_info=CloneDrawInfo(wand->image_info,(DrawInfo *) NULL);
   draw_info->primitive=primitive;
-  status=DrawImage(wand->images,draw_info);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=DrawImage(wand->images,draw_info,wand->exception);
   draw_info=DestroyDrawInfo(draw_info);
   return(status);
 }
@@ -2529,7 +2517,8 @@ WandExport MagickBooleanType MagickDrawImage(MagickWand *wand,
 %
 %  The format of the MagickEdgeImage method is:
 %
-%      MagickBooleanType MagickEdgeImage(MagickWand *wand,const double radius)
+%      MagickBooleanType MagickEdgeImage(MagickWand *wand,const double radius,
+%        const double sigma)
 %
 %  A description of each parameter follows:
 %
@@ -2537,9 +2526,11 @@ WandExport MagickBooleanType MagickDrawImage(MagickWand *wand,
 %
 %    o radius: the radius of the pixel neighborhood.
 %
+%    o sigma: the standard deviation of the Gaussian, in pixels.
+%
 */
 WandExport MagickBooleanType MagickEdgeImage(MagickWand *wand,
-  const double radius)
+  const double radius,const double sigma)
 {
   Image
     *edge_image;
@@ -2550,7 +2541,7 @@ WandExport MagickBooleanType MagickEdgeImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  edge_image=EdgeImage(wand->images,radius,wand->exception);
+  edge_image=EdgeImage(wand->images,radius,sigma,wand->exception);
   if (edge_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,edge_image);
@@ -2721,9 +2712,7 @@ WandExport MagickBooleanType MagickEqualizeImage(MagickWand *wand)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=EqualizeImage(wand->images);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=EqualizeImage(wand->images,&wand->images->exception);
   return(status);
 }
 \f
@@ -3036,9 +3025,8 @@ WandExport MagickBooleanType MagickFloodfillPaintImage(MagickWand *wand,
   if (bordercolor != (PixelWand *) NULL)
     PixelGetMagickColor(bordercolor,&target);
   wand->images->fuzz=fuzz;
-  status=FloodfillPaintImage(wand->images,draw_info,&target,x,y,invert);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=FloodfillPaintImage(wand->images,draw_info,&target,x,y,invert,
+    &wand->images->exception);
   draw_info=DestroyDrawInfo(draw_info);
   return(status);
 }
@@ -3336,9 +3324,7 @@ WandExport MagickBooleanType MagickGammaImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=GammaImage(wand->images,gamma);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=GammaImage(wand->images,gamma,wand->exception);
   return(status);
 }
 \f
@@ -3361,7 +3347,7 @@ WandExport MagickBooleanType MagickGammaImage(MagickWand *wand,
 %  The format of the MagickGaussianBlurImage method is:
 %
 %      MagickBooleanType MagickGaussianBlurImage(MagickWand *wand,
-%        const double radius,const double sigma)
+%        const double radius,const double sigma,const double bias)
 %
 %  A description of each parameter follows:
 %
@@ -3372,9 +3358,11 @@ WandExport MagickBooleanType MagickGammaImage(MagickWand *wand,
 %
 %    o sigma: the standard deviation of the Gaussian, in pixels.
 %
+%    o bias: the bias.
+%
 */
 WandExport MagickBooleanType MagickGaussianBlurImage(MagickWand *wand,
-  const double radius,const double sigma)
+  const double radius,const double sigma,const double bias)
 {
   Image
     *blur_image;
@@ -3385,7 +3373,7 @@ WandExport MagickBooleanType MagickGaussianBlurImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  blur_image=GaussianBlurImage(wand->images,radius,sigma,wand->exception);
+  blur_image=GaussianBlurImage(wand->images,radius,sigma,bias,wand->exception);
   if (blur_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,blur_image);
@@ -4775,14 +4763,15 @@ WandExport InterlaceType MagickGetImageInterlaceScheme(MagickWand *wand)
 %
 %  The format of the MagickGetImageInterpolateMethod method is:
 %
-%      InterpolatePixelMethod MagickGetImageInterpolateMethod(MagickWand *wand)
+%      PixelInterpolateMethod MagickGetImagePixelInterpolateMethod(
+%        MagickWand *wand)
 %
 %  A description of each parameter follows:
 %
 %    o wand: the magick wand.
 %
 */
-WandExport InterpolatePixelMethod MagickGetImageInterpolateMethod(
+WandExport PixelInterpolateMethod MagickGetImageInterpolateMethod(
   MagickWand *wand)
 {
   assert(wand != (MagickWand *) NULL);
@@ -5297,14 +5286,13 @@ WandExport char *MagickGetImageSignature(MagickWand *wand)
         "ContainsNoImages","`%s'",wand->name);
       return((char *) NULL);
     }
-  status=SignatureImage(wand->images);
+  status=SignatureImage(wand->images,wand->exception);
   if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+    return((char *) NULL);
   value=GetImageProperty(wand->images,"signature");
-  if (value != (const char *) NULL)
-    return(AcquireString(value));
-  InheritException(wand->exception,&wand->images->exception);
-  return((char *) NULL);
+  if (value == (const char *) NULL)
+    return((char *) NULL);
+  return(AcquireString(value));
 }
 \f
 /*
@@ -5644,9 +5632,7 @@ WandExport MagickBooleanType MagickHaldClutImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if ((wand->images == (Image *) NULL) || (hald_wand->images == (Image *) NULL))
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=HaldClutImage(wand->images,hald_wand->images);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=HaldClutImage(wand->images,hald_wand->images,&wand->images->exception);
   return(status);
 }
 \f
@@ -5778,7 +5764,7 @@ WandExport char *MagickIdentifyImage(MagickWand *wand)
         "UnableToCreateTemporaryFile","`%s'",wand->name);
       return((char *) NULL);
     }
-  (void) IdentifyImage(wand->images,file,MagickTrue);
+  (void) IdentifyImage(wand->images,file,MagickTrue,wand->exception);
   (void) fclose(file);
   description=FileToString(filename,~0,wand->exception);
   (void) RelinquishUniqueFileResource(filename);
@@ -5884,9 +5870,8 @@ WandExport MagickBooleanType MagickImplodeImage(MagickWand *wand,
 %
 */
 WandExport MagickBooleanType MagickImportImagePixels(MagickWand *wand,
-  const ssize_t x,const ssize_t y,const size_t columns,
-  const size_t rows,const char *map,const StorageType storage,
-  const void *pixels)
+  const ssize_t x,const ssize_t y,const size_t columns,const size_t rows,
+  const char *map,const StorageType storage,const void *pixels)
 {
   MagickBooleanType
     status;
@@ -5897,9 +5882,8 @@ WandExport MagickBooleanType MagickImportImagePixels(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=ImportImagePixels(wand->images,x,y,columns,rows,map,storage,pixels);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=ImportImagePixels(wand->images,x,y,columns,rows,map,storage,pixels,
+    wand->exception);
   return(status);
 }
 \f
@@ -6058,9 +6042,8 @@ WandExport MagickBooleanType MagickLevelImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=LevelImage(wand->images,black_point,white_point,gamma);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=LevelImage(wand->images,black_point,white_point,gamma,
+    &wand->images->exception);
   return(status);
 }
 \f
@@ -6106,9 +6089,8 @@ WandExport MagickBooleanType MagickLinearStretchImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=LinearStretchImage(wand->images,black_point,white_point);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=LinearStretchImage(wand->images,black_point,white_point,
+    &wand->images->exception);
   return(status);
 }
 \f
@@ -6359,9 +6341,7 @@ WandExport MagickBooleanType MagickModulateImage(MagickWand *wand,
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
   (void) FormatLocaleString(modulate,MaxTextExtent,"%g,%g,%g",
     brightness,saturation,hue);
-  status=ModulateImage(wand->images,modulate);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=ModulateImage(wand->images,modulate,&wand->images->exception);
   return(status);
 }
 \f
@@ -6597,7 +6577,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:
 %
@@ -6612,7 +6593,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;
@@ -6623,7 +6604,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);
@@ -6672,9 +6654,7 @@ WandExport MagickBooleanType MagickNegateImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=NegateImage(wand->images,gray);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=NegateImage(wand->images,gray,wand->exception);
   return(status);
 }
 \f
@@ -6814,9 +6794,7 @@ WandExport MagickBooleanType MagickNormalizeImage(MagickWand *wand)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=NormalizeImage(wand->images);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=NormalizeImage(wand->images,&wand->images->exception);
   return(status);
 }
 \f
@@ -6838,7 +6816,7 @@ WandExport MagickBooleanType MagickNormalizeImage(MagickWand *wand)
 %  The format of the MagickOilPaintImage method is:
 %
 %      MagickBooleanType MagickOilPaintImage(MagickWand *wand,
-%        const double radius)
+%        const double radius,const double sigma)
 %
 %  A description of each parameter follows:
 %
@@ -6846,9 +6824,11 @@ WandExport MagickBooleanType MagickNormalizeImage(MagickWand *wand)
 %
 %    o radius: the radius of the circular neighborhood.
 %
+%    o sigma: the standard deviation of the Gaussian, in pixels.
+%
 */
 WandExport MagickBooleanType MagickOilPaintImage(MagickWand *wand,
-  const double radius)
+  const double radius,const double sigma)
 {
   Image
     *paint_image;
@@ -6859,7 +6839,7 @@ WandExport MagickBooleanType MagickOilPaintImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  paint_image=OilPaintImage(wand->images,radius,wand->exception);
+  paint_image=OilPaintImage(wand->images,radius,sigma,wand->exception);
   if (paint_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,paint_image);
@@ -6924,9 +6904,8 @@ WandExport MagickBooleanType MagickOpaquePaintImage(MagickWand *wand,
   PixelGetMagickColor(target,&target_pixel);
   PixelGetMagickColor(fill,&fill_pixel);
   wand->images->fuzz=fuzz;
-  status=OpaquePaintImage(wand->images,&target_pixel,&fill_pixel,invert);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=OpaquePaintImage(wand->images,&target_pixel,&fill_pixel,invert,
+    &wand->images->exception);
   return(status);
 }
 \f
@@ -7195,7 +7174,8 @@ WandExport MagickBooleanType MagickPingImageFile(MagickWand *wand,FILE *file)
 %  The format of the MagickPolaroidImage method is:
 %
 %      MagickBooleanType MagickPolaroidImage(MagickWand *wand,
-%        const DrawingWand *drawing_wand,const double angle)
+%        const DrawingWand *drawing_wand,const double angle,
+%        const PixelInterpolateMethod method)
 %
 %  A description of each parameter follows:
 %
@@ -7205,9 +7185,12 @@ WandExport MagickBooleanType MagickPingImageFile(MagickWand *wand,FILE *file)
 %
 %    o angle: Apply the effect along this angle.
 %
+%    o method: the pixel interpolation method.
+%
 */
 WandExport MagickBooleanType MagickPolaroidImage(MagickWand *wand,
-  const DrawingWand *drawing_wand,const double angle)
+  const DrawingWand *drawing_wand,const double angle,
+  const PixelInterpolateMethod method)
 {
   DrawInfo
     *draw_info;
@@ -7224,7 +7207,8 @@ WandExport MagickBooleanType MagickPolaroidImage(MagickWand *wand,
   draw_info=PeekDrawingWand(drawing_wand);
   if (draw_info == (DrawInfo *) NULL)
     return(MagickFalse);
-  polaroid_image=PolaroidImage(wand->images,draw_info,angle,wand->exception);
+  polaroid_image=PolaroidImage(wand->images,draw_info,angle,method,
+    wand->exception);
   if (polaroid_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,polaroid_image);
@@ -7272,9 +7256,7 @@ WandExport MagickBooleanType MagickPosterizeImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=PosterizeImage(wand->images,levels,dither);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=PosterizeImage(wand->images,levels,dither,wand->exception);
   return(status);
 }
 \f
@@ -7443,9 +7425,7 @@ WandExport MagickBooleanType MagickQuantizeImage(MagickWand *wand,
   quantize_info->tree_depth=treedepth;
   quantize_info->colorspace=colorspace;
   quantize_info->measure_error=measure_error;
-  status=QuantizeImage(quantize_info,wand->images);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=QuantizeImage(quantize_info,wand->images,wand->exception);
   quantize_info=DestroyQuantizeInfo(quantize_info);
   return(status);
 }
@@ -7524,9 +7504,7 @@ WandExport MagickBooleanType MagickQuantizeImages(MagickWand *wand,
   quantize_info->tree_depth=treedepth;
   quantize_info->colorspace=colorspace;
   quantize_info->measure_error=measure_error;
-  status=QuantizeImages(quantize_info,wand->images);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=QuantizeImages(quantize_info,wand->images,wand->exception);
   quantize_info=DestroyQuantizeInfo(quantize_info);
   return(status);
 }
@@ -7547,7 +7525,7 @@ WandExport MagickBooleanType MagickQuantizeImages(MagickWand *wand,
 %  The format of the MagickRadialBlurImage method is:
 %
 %      MagickBooleanType MagickRadialBlurImage(MagickWand *wand,
-%        const double angle)
+%        const double angle,const double bias)
 %
 %  A description of each parameter follows:
 %
@@ -7555,9 +7533,11 @@ WandExport MagickBooleanType MagickQuantizeImages(MagickWand *wand,
 %
 %    o angle: the angle of the blur in degrees.
 %
+%    o bias: the bias.
+%
 */
 WandExport MagickBooleanType MagickRadialBlurImage(MagickWand *wand,
-  const double angle)
+  const double angle,const double bias)
 {
   Image
     *blur_image;
@@ -7568,7 +7548,7 @@ WandExport MagickBooleanType MagickRadialBlurImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  blur_image=RadialBlurImage(wand->images,angle,wand->exception);
+  blur_image=RadialBlurImage(wand->images,angle,bias,wand->exception);
   if (blur_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,blur_image);
@@ -7627,9 +7607,7 @@ WandExport MagickBooleanType MagickRaiseImage(MagickWand *wand,
   raise_info.height=height;
   raise_info.x=x;
   raise_info.y=y;
-  status=RaiseImage(wand->images,&raise_info,raise);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=RaiseImage(wand->images,&raise_info,raise,&wand->images->exception);
   return(status);
 }
 \f
@@ -7873,10 +7851,9 @@ WandExport MagickBooleanType MagickRemapImage(MagickWand *wand,
   quantize_info->dither_method=method;
   if (method == NoDitherMethod)
     quantize_info->dither=MagickFalse;
-  status=RemapImage(quantize_info,wand->images,remap_wand->images);
+  status=RemapImage(quantize_info,wand->images,remap_wand->images,
+    wand->exception);
   quantize_info=DestroyQuantizeInfo(quantize_info);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
   return(status);
 }
 \f
@@ -8331,9 +8308,7 @@ MagickExport MagickBooleanType MagickSegmentImage(MagickWand *wand,
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
   status=SegmentImage(wand->images,colorspace,verbose,cluster_threshold,
-    smooth_threshold);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+    smooth_threshold,wand->exception);
   return(status);
 }
 \f
@@ -8355,7 +8330,8 @@ MagickExport MagickBooleanType MagickSegmentImage(MagickWand *wand,
 %  The format of the MagickSelectiveBlurImage method is:
 %
 %      MagickBooleanType MagickSelectiveBlurImage(MagickWand *wand,
-%        const double radius,const double sigma,const double threshold)
+%        const double radius,const double sigma,const double threshold,
+%        const double bias)
 %
 %  A description of each parameter follows:
 %
@@ -8369,9 +8345,12 @@ MagickExport MagickBooleanType MagickSegmentImage(MagickWand *wand,
 %    o threshold: only pixels within this contrast threshold are included
 %      in the blur operation.
 %
+%    o bias: the bias.
+%
 */
 WandExport MagickBooleanType MagickSelectiveBlurImage(MagickWand *wand,
-  const double radius,const double sigma,const double threshold)
+  const double radius,const double sigma,const double threshold,
+  const double bias)
 {
   Image
     *blur_image;
@@ -8382,7 +8361,7 @@ WandExport MagickBooleanType MagickSelectiveBlurImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  blur_image=SelectiveBlurImage(wand->images,radius,sigma,threshold,
+  blur_image=SelectiveBlurImage(wand->images,radius,sigma,threshold,bias,
     wand->exception);
   if (blur_image == (Image *) NULL)
     return(MagickFalse);
@@ -8564,7 +8543,7 @@ WandExport MagickBooleanType MagickSetImageAlphaChannel(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  return(SetImageAlphaChannel(wand->images,alpha_type));
+  return(SetImageAlphaChannel(wand->images,alpha_type,&wand->images->exception));
 }
 \f
 /*
@@ -8761,7 +8740,7 @@ WandExport MagickBooleanType MagickSetImageClipMask(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clip_mask->name);
   if (clip_mask->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  return(SetImageClipMask(wand->images,clip_mask->images));
+  return(SetImageClipMask(wand->images,clip_mask->images,wand->exception));
 }
 \f
 /*
@@ -8891,7 +8870,7 @@ WandExport MagickBooleanType MagickSetImageColorspace(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  return(SetImageColorspace(wand->images,colorspace));
+  return(SetImageColorspace(wand->images,colorspace,&wand->images->exception));
 }
 \f
 /*
@@ -9159,7 +9138,7 @@ WandExport MagickBooleanType MagickSetImageExtent(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  return(SetImageExtent(wand->images,columns,rows));
+  return(SetImageExtent(wand->images,columns,rows,&wand->images->exception));
 }
 \f
 /*
@@ -9461,12 +9440,12 @@ WandExport MagickBooleanType MagickSetImageInterlaceScheme(MagickWand *wand,
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  MagickSetImageInterpolateMethod() sets the image interpolate pixel method.
+%  MagickSetImagePixelInterpolateMethod() sets the image interpolate pixel method.
 %
-%  The format of the MagickSetImageInterpolateMethod method is:
+%  The format of the MagickSetImagePixelInterpolateMethod method is:
 %
-%      MagickBooleanType MagickSetImageInterpolateMethod(MagickWand *wand,
-%        const InterpolatePixelMethod method)
+%      MagickBooleanType MagickSetImagePixelInterpolateMethod(MagickWand *wand,
+%        const PixelInterpolateMethod method)
 %
 %  A description of each parameter follows:
 %
@@ -9476,8 +9455,8 @@ WandExport MagickBooleanType MagickSetImageInterlaceScheme(MagickWand *wand,
 %      Average, Bicubic, Bilinear, Filter, Integer, Mesh, NearestNeighbor.
 %
 */
-WandExport MagickBooleanType MagickSetImageInterpolateMethod(MagickWand *wand,
-  const InterpolatePixelMethod method)
+WandExport MagickBooleanType MagickSetImagePixelInterpolateMethod(MagickWand *wand,
+  const PixelInterpolateMethod method)
 {
   assert(wand != (MagickWand *) NULL);
   assert(wand->signature == WandSignature);
@@ -10029,7 +10008,7 @@ WandExport MagickBooleanType MagickSetImageType(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  return(SetImageType(wand->images,image_type));
+  return(SetImageType(wand->images,image_type,wand->exception));
 }
 \f
 /*
@@ -10270,7 +10249,7 @@ WandExport MagickBooleanType MagickShadowImage(MagickWand *wand,
 %  The format of the MagickSharpenImage method is:
 %
 %      MagickBooleanType MagickSharpenImage(MagickWand *wand,
-%        const double radius,const double sigma)
+%        const double radius,const double sigma,const double bias)
 %
 %  A description of each parameter follows:
 %
@@ -10281,9 +10260,11 @@ WandExport MagickBooleanType MagickShadowImage(MagickWand *wand,
 %
 %    o sigma: the standard deviation of the Gaussian, in pixels.
 %
+%    o bias: the bias.
+%
 */
 WandExport MagickBooleanType MagickSharpenImage(MagickWand *wand,
-  const double radius,const double sigma)
+  const double radius,const double sigma,const double bias)
 {
   Image
     *sharp_image;
@@ -10294,7 +10275,7 @@ WandExport MagickBooleanType MagickSharpenImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  sharp_image=SharpenImage(wand->images,radius,sigma,wand->exception);
+  sharp_image=SharpenImage(wand->images,radius,sigma,bias,wand->exception);
   if (sharp_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,sharp_image);
@@ -10462,9 +10443,8 @@ WandExport MagickBooleanType MagickSigmoidalContrastImage(
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=SigmoidalContrastImage(wand->images,sharpen,alpha,beta);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=SigmoidalContrastImage(wand->images,sharpen,alpha,beta,
+    &wand->images->exception);
   return(status);
 }
 \f
@@ -10543,7 +10523,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:
 %
@@ -10554,11 +10535,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;
@@ -10569,7 +10552,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);
@@ -10664,9 +10648,7 @@ WandExport MagickBooleanType MagickSolarizeImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  status=SolarizeImage(wand->images,threshold);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+  status=SolarizeImage(wand->images,threshold,&wand->images->exception);
   return(status);
 }
 \f
@@ -10817,7 +10799,8 @@ WandExport MagickBooleanType MagickSpliceImage(MagickWand *wand,
 %
 %  The format of the MagickSpreadImage method is:
 %
-%      MagickBooleanType MagickSpreadImage(MagickWand *wand,const double radius)
+%      MagickBooleanType MagickSpreadImage(MagickWand *wand,const double radius,
+%        const PixelInterpolateMethod method)
 %
 %  A description of each parameter follows:
 %
@@ -10825,9 +10808,11 @@ WandExport MagickBooleanType MagickSpliceImage(MagickWand *wand,
 %
 %    o radius:  Choose a random pixel in a neighborhood of this extent.
 %
+%    o method: the pixel interpolation method.
+%
 */
 WandExport MagickBooleanType MagickSpreadImage(MagickWand *wand,
-  const double radius)
+  const double radius,const PixelInterpolateMethod method)
 {
   Image
     *spread_image;
@@ -10838,7 +10823,7 @@ WandExport MagickBooleanType MagickSpreadImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  spread_image=SpreadImage(wand->images,radius,wand->exception);
+  spread_image=SpreadImage(wand->images,radius,method,wand->exception);
   if (spread_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,spread_image);
@@ -11471,9 +11456,7 @@ WandExport MagickBooleanType MagickTransparentPaintImage(MagickWand *wand,
   PixelGetMagickColor(target,&target_pixel);
   wand->images->fuzz=fuzz;
   status=TransparentPaintImage(wand->images,&target_pixel,ClampToQuantum(
-    QuantumRange*alpha),invert);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&wand->images->exception);
+    QuantumRange*alpha),invert,&wand->images->exception);
   return(status);
 }
 \f
@@ -11772,8 +11755,9 @@ WandExport MagickBooleanType MagickVignetteImage(MagickWand *wand,
 %
 %  The format of the MagickWaveImage method is:
 %
-%      MagickBooleanType MagickWaveImage(MagickWand *wand,const double amplitude,
-%        const double wave_length)
+%      MagickBooleanType MagickWaveImage(MagickWand *wand,
+%        const double amplitude,const double wave_length,
+%        const PixelInterpolateMethod method)
 %
 %  A description of each parameter follows:
 %
@@ -11782,9 +11766,12 @@ WandExport MagickBooleanType MagickVignetteImage(MagickWand *wand,
 %    o amplitude, wave_length:  Define the amplitude and wave length of the
 %      sine wave.
 %
+%    o method: the pixel interpolation method.
+%
 */
 WandExport MagickBooleanType MagickWaveImage(MagickWand *wand,
-  const double amplitude,const double wave_length)
+  const double amplitude,const double wave_length,
+  const PixelInterpolateMethod method)
 {
   Image
     *wave_image;
@@ -11795,7 +11782,8 @@ WandExport MagickBooleanType MagickWaveImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  wave_image=WaveImage(wand->images,amplitude,wave_length,wand->exception);
+  wave_image=WaveImage(wand->images,amplitude,wave_length,method,
+    wand->exception);
   if (wave_image == (Image *) NULL)
     return(MagickFalse);
   ReplaceImageInList(&wand->images,wave_image);
@@ -11907,9 +11895,7 @@ WandExport MagickBooleanType MagickWriteImage(MagickWand *wand,
     return(MagickFalse);
   write_info=CloneImageInfo(wand->image_info);
   write_info->adjoin=MagickTrue;
-  status=WriteImage(write_info,image);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&image->exception);
+  status=WriteImage(write_info,image,&image->exception);
   image=DestroyImage(image);
   write_info=DestroyImageInfo(write_info);
   return(status);
@@ -11963,10 +11949,8 @@ WandExport MagickBooleanType MagickWriteImageFile(MagickWand *wand,FILE *file)
   write_info=CloneImageInfo(wand->image_info);
   SetImageInfoFile(write_info,file);
   write_info->adjoin=MagickTrue;
-  status=WriteImage(write_info,image);
+  status=WriteImage(write_info,image,&image->exception);
   write_info=DestroyImageInfo(write_info);
-  if (status == MagickFalse)
-    InheritException(wand->exception,&image->exception);
   image=DestroyImage(image);
   return(status);
 }