]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 13 Jan 2011 01:11:00 +0000 (01:11 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 13 Jan 2011 01:11:00 +0000 (01:11 +0000)
magick/display.c

index 29b3111f4594963c094501e0d58396672a5938ba..6d7a0cb3d2a2f12c2aded262449178a52dc48cc0 100644 (file)
@@ -6377,8 +6377,8 @@ static void XDrawPanRectangle(Display *display,XWindows *windows)
 %
 %    o command: Specifies a command to perform.
 %
-%    o image: the image;  XImageCache
-%      may transform the image and return a new image pointer.
+%    o image: the image;  XImageCache may transform the image and return a new
+%      image pointer.
 %
 */
 static void XImageCache(Display *display,XResourceInfo *resource_info,
@@ -6413,6 +6413,9 @@ static void XImageCache(Display *display,XResourceInfo *resource_info,
     }
     case UndoCommand:
     {
+      char
+        image_geometry[MaxTextExtent];
+
       /*
         Undo the last image transformation.
       */
@@ -6425,6 +6428,9 @@ static void XImageCache(Display *display,XResourceInfo *resource_info,
       undo_image=GetPreviousImageInList(undo_image);
       windows->image.window_changes.width=(int) cache_image->columns;
       windows->image.window_changes.height=(int) cache_image->rows;
+      (void) FormatMagickString(image_geometry,MaxTextExtent,"%dx%d!",
+        windows->image.ximage->width,windows->image.ximage->height);
+      (void) TransformImage(image,windows->image.crop_geometry,image_geometry);
       if (windows->image.crop_geometry != (char *) NULL)
         windows->image.crop_geometry=(char *)
           RelinquishMagickMemory(windows->image.crop_geometry);
@@ -6511,7 +6517,7 @@ static void XImageCache(Display *display,XResourceInfo *resource_info,
       if (undo_image != (Image *) NULL)
         {
           /*
-            Ensure the undo stash.has enough memory available.
+            Ensure the undo cache has enough memory available.
           */
           previous_image=undo_image;
           while (previous_image != (Image *) NULL)