]> granicus.if.org Git - imagemagick/blobdiff - MagickWand/display.c
(no commit message)
[imagemagick] / MagickWand / display.c
index c8a117e0fda3d5d74ddf78e708dadf19190db3d2..554c1f32c5b6f9ec69291723a2d54f1e1420171e 100644 (file)
 %              Methods to Interactively Display and Edit an Image             %
 %                                                                             %
 %                             Software Design                                 %
-%                               John Cristy                                   %
+%                                  Cristy                                     %
 %                                July 1992                                    %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -187,6 +187,7 @@ static MagickBooleanType DisplayUsage(void)
       "-limit type value    pixel cache resource limit",
       "-loop iterations     loop images then exit",
       "-map type            display image using this Standard Colormap",
+      "-matte               store matte channel if the image has one",
       "-monitor             monitor progress",
       "-page geometry       size and location of an image canvas",
       "-profile filename    add, delete, or apply an image profile",
@@ -199,9 +200,11 @@ static MagickBooleanType DisplayUsage(void)
       "-respect-parentheses settings remain in effect until parenthesis boundary",
       "-sampling-factor geometry",
       "                     horizontal and vertical sampling factor",
+      "-scenes range        image scene range",
       "-seed value          seed a new sequence of pseudo-random numbers",
       "-set property value  set an image property",
       "-size geometry       width and height of image",
+      "-support factor      resize support: > 1.0 is blurry, < 1.0 is sharp",
       "-texture filename    name of texture to tile onto the image background",
       "-transparent-color color",
       "                     transparent color",
@@ -223,9 +226,7 @@ static MagickBooleanType DisplayUsage(void)
       (char *) NULL
     };
 
-  (void) printf("Version: %s\n",GetMagickVersion((size_t *) NULL));
-  (void) printf("Copyright: %s\n",GetMagickCopyright());
-  (void) printf("Features: %s\n\n",GetMagickFeatures());
+  ListMagickVersion(stdout);
   (void) printf("Usage: %s [options ...] file [ [options ...] file ...]\n",
     GetClientName());
   (void) printf("\nImage Settings:\n");
@@ -285,7 +286,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
 }
 #define ThrowDisplayException(asperity,tag,option) \
 { \
-  (void) ThrowMagickException(exception,GetMagickModule(),asperity,tag,"'%s'", \
+  (void) ThrowMagickException(exception,GetMagickModule(),asperity,tag,"`%s'", \
     option); \
   DestroyDisplay(); \
   return(MagickFalse); \
@@ -361,12 +362,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) FormatLocaleFile(stdout,"Version: %s\n",
-            GetMagickVersion((size_t *) NULL));
-          (void) FormatLocaleFile(stdout,"Copyright: %s\n",
-            GetMagickCopyright());
-          (void) FormatLocaleFile(stdout,"Features: %s\n\n",
-            GetMagickFeatures());
+          ListMagickVersion(stdout);
           return(MagickFalse);
         }
     }
@@ -553,6 +549,8 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
                   state|=RetainColorsState;
                   status=MagickFalse;
                 }
+              if (GetNextImageInList(display_image) == (Image *) NULL)
+                state|=ExitState;
             }
           else
             do
@@ -615,24 +613,23 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
           if ((state & FormerImageState) != 0)
             for (l=0; l < (ssize_t) resource_info.quantum; l++)
             {
-              display_image=GetPreviousImageInList(display_image);
-              if (display_image == (Image *) NULL)
+              if (GetPreviousImageInList(display_image) == (Image *) NULL)
                 break;
+              display_image=GetPreviousImageInList(display_image);
             }
           else
             for (l=0; l < (ssize_t) resource_info.quantum; l++)
             {
-              display_image=GetNextImageInList(display_image);
-              if (display_image == (Image *) NULL)
+              if (GetNextImageInList(display_image) == (Image *) NULL)
                 break;
+              display_image=GetNextImageInList(display_image);
             }
+          if (l < (ssize_t) resource_info.quantum)
+            break;
         } while ((display_image != (Image *) NULL) && ((state & ExitState) == 0));
         /*
           Free image resources.
         */
-        display_image=GetFirstImageInList(display_image);
-        if (image_list != display_image)
-          image_list=DestroyImageList(image_list);
         display_image=DestroyImageList(display_image);
         if ((state & FormerImageState) == 0)
           {
@@ -1796,12 +1793,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) FormatLocaleFile(stdout,"Version: %s\n",
-              GetMagickVersion((size_t *) NULL));
-            (void) FormatLocaleFile(stdout,"Copyright: %s\n",
-              GetMagickCopyright());
-            (void) FormatLocaleFile(stdout,"Features: %s\n\n",
-              GetMagickFeatures());
+            ListMagickVersion(stdout);
             break;
           }
         if (LocaleCompare("visual",option+1) == 0)