]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authoranthony <anthony@git.imagemagick.org>
Thu, 15 Mar 2012 13:24:43 +0000 (13:24 +0000)
committeranthony <anthony@git.imagemagick.org>
Thu, 15 Mar 2012 13:24:43 +0000 (13:24 +0000)
MagickWand/magick-image.c
MagickWand/magick-wand.c

index 526214d671615e4efff2511daa69f6fcac084130..278edb95b697adb02479fc414df1d2ddfebc5fdf 100644 (file)
@@ -402,7 +402,7 @@ WandExport MagickBooleanType MagickAdaptiveThresholdImage(MagickWand *wand,
 static inline MagickBooleanType InsertImageInWand(MagickWand *wand,
   Image *images)
 {
-  /* if no images in wand, just add them, set wand->images as appropriate */
+  /* if no images in wand, just add them, set current as appropriate */
   if (wand->images == (Image *) NULL)
     {
       if (wand->insert_before != MagickFalse)
@@ -420,9 +420,9 @@ static inline MagickBooleanType InsertImageInWand(MagickWand *wand,
       wand->images=GetFirstImageInList(images);
       return(MagickTrue);
     }
-  /* Note you should never have 'insert_before' true when wand->images image
+  /* Note you should never have 'insert_before' true when current image
      is not the first image in the wand!  That is no insert before
-     wand->images image, only after current image */
+     current image, only after current image */
 
   /* if at last image append new images */
   if (wand->images->next == (Image *) NULL)
@@ -431,7 +431,7 @@ static inline MagickBooleanType InsertImageInWand(MagickWand *wand,
       wand->images=GetLastImageInList(images);
       return(MagickTrue);
     }
-  /* otherwise insert new images, just after the wand->images image */
+  /* otherwise insert new images, just after the current image */
   InsertImageInList(&wand->images,images);
   return(MagickTrue);
 }
@@ -6834,7 +6834,7 @@ WandExport MagickBooleanType MagickNewImage(MagickWand *wand,const size_t width,
 %
 %  MagickNextImage() sets the next image in the wand as the current image.
 %  It returns MagickTrue if their is another image to be processed.
-%  
+%
 %  Returns MagickFalse when current image is already the last image
 %  in the wand (no more next images), at whcih point you can use
 %  MagickPreviousImage() to again iterate over the images in the reverse
index 2fd8ce15f26b370f7638e36159cce6dab4810fc3..cc44b0c5d1d776e3624e63feadbbf8e6590fb361 100644 (file)
@@ -92,6 +92,8 @@ WandExport void ClearMagickWand(MagickWand *wand)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   wand->images=DestroyImageList(wand->images);
   wand->image_info=AcquireImageInfo();
+  wand->insert_before=MagickFalse;
+  wand->image_pending=MagickFalse;
   ClearMagickException(wand->exception);
   wand->debug=IsEventLogging();
 }
@@ -139,6 +141,8 @@ WandExport MagickWand *CloneMagickWand(const MagickWand *wand)
   InheritException(clone_wand->exception,wand->exception);
   clone_wand->image_info=CloneImageInfo(wand->image_info);
   clone_wand->images=CloneImageList(wand->images,clone_wand->exception);
+  clone_wand->insert_before=MagickFalse;
+  clone_wand->image_pending=MagickFalse;
   clone_wand->debug=IsEventLogging();
   if (clone_wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clone_wand->name);
@@ -826,7 +830,7 @@ WandExport void MagickResetIterator(MagickWand *wand)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   wand->images=GetFirstImageInList(wand->images);
   wand->insert_before=MagickFalse; /* Insert/add after current (first) image */
-  wand->image_pending=MagickTrue;  /* NextImage will remain this image */
+  wand->image_pending=MagickTrue;  /* NextImage will set first image */
 }
 \f
 /*