]> granicus.if.org Git - imagemagick/commitdiff
Basic changes in prep for "magick" command
authoranthony <anthony@git.imagemagick.org>
Sun, 12 Feb 2012 12:39:02 +0000 (12:39 +0000)
committeranthony <anthony@git.imagemagick.org>
Sun, 12 Feb 2012 12:39:02 +0000 (12:39 +0000)
MagickCore/option.c
MagickCore/option.h
MagickWand/magick-image.c
MagickWand/magick-wand.c
MagickWand/operation.c
config/english.xml
config/francais.xml

index a183bea0460a1195fddf41b9ffeae1a44eb2a9fd..b4054483a49297e9de3b9934d5459911fc006340 100644 (file)
@@ -339,6 +339,7 @@ static const OptionInfo
     { "-evaluate", 2L, SimpleOperatorOptionFlag, MagickFalse },
     { "+evaluate-sequence", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
     { "-evaluate-sequence", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
+    { "-exit", 1L, SpecialOptionFlag, MagickFalse },
     { "+extent", 1L, DeprecateOptionFlag, MagickTrue },
     { "-extent", 1L, SimpleOperatorOptionFlag, MagickFalse },
     { "+extract", 0L, ImageInfoOptionFlag, MagickFalse },
@@ -389,8 +390,6 @@ static const OptionInfo
     { "-green-primary", 1L, ImageInfoOptionFlag, MagickFalse },
     { "+hald-clut", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
     { "-hald-clut", 0L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
-    { "+help", 0L, SpecialOptionFlag, MagickFalse },
-    { "-help", 0L, SpecialOptionFlag, MagickFalse },
     { "+highlight-color", 1L, SimpleOperatorOptionFlag, MagickFalse },
     { "-highlight-color", 1L, SimpleOperatorOptionFlag, MagickFalse },
     { "+iconGeometry", 0L, NonConvertOptionFlag, MagickFalse },
@@ -485,7 +484,6 @@ static const OptionInfo
     { "-negate", 0L, SimpleOperatorOptionFlag, MagickFalse },
     { "+noise", 1L, SimpleOperatorOptionFlag, MagickFalse },
     { "-noise", 1L, SimpleOperatorOptionFlag, MagickFalse },
-    { "+noop", 0L, SpecialOptionFlag, MagickFalse },
     { "-noop", 0L, SpecialOptionFlag, MagickFalse },
     { "+normalize", 0L, DeprecateOptionFlag, MagickTrue },
     { "-normalize", 0L, SimpleOperatorOptionFlag, MagickFalse },
@@ -501,8 +499,8 @@ static const OptionInfo
     { "-page", 1L, ImageInfoOptionFlag, MagickFalse },
     { "+paint", 0L, DeprecateOptionFlag, MagickTrue },
     { "-paint", 1L, SimpleOperatorOptionFlag, MagickFalse },
-    { "+path", 0L, SpecialOptionFlag, MagickFalse },
-    { "-path", 1L, SpecialOptionFlag, MagickFalse },
+    { "+path", 0L, NonConvertOptionFlag, MagickFalse },
+    { "-path", 1L, NonConvertOptionFlag, MagickFalse },
     { "+pause", 0L, NonConvertOptionFlag, MagickFalse },
     { "-pause", 1L, NonConvertOptionFlag, MagickFalse },
     { "+passphrase", 0L, DeprecateOptionFlag, MagickTrue },
@@ -703,7 +701,7 @@ static const OptionInfo
     { "+verbose", 0L, ImageInfoOptionFlag, MagickFalse },
     { "-verbose", 0L, ImageInfoOptionFlag, MagickFalse },
     { "+version", 0L, DeprecateOptionFlag, MagickTrue },
-    { "-version", 1L, SpecialOptionFlag, MagickFalse },
+    { "-version", 0L, SpecialOptionFlag, MagickFalse },
     { "+view", 0L, ImageInfoOptionFlag, MagickFalse },
     { "-view", 1L, ImageInfoOptionFlag, MagickFalse },
     { "+vignette", 1L, DeprecateOptionFlag, MagickTrue },
@@ -1913,7 +1911,7 @@ MagickExport ssize_t GetCommandOptionFlags(const CommandOption option,
 
   option_info=GetOptionInfo(option);
   if (option_info == (const OptionInfo *) NULL)
-    return(-1);
+    return(UndefinedOptionFlag);
   option_types=0;
   sentinel=',';
   if (strchr(options,'|') != (char *) NULL)
index 8ed06bf6a5c61d3453ebb179089eb7676fdc0bbf..8d88947446f3dbe137272006a71212691aee7260 100644 (file)
@@ -145,7 +145,7 @@ typedef enum
   SpecialOptionFlag         = 0x0040,  /* Special handled Option */
   GenesisOptionFlag         = 0x0080,  /* Genesis Command Wrapper Option  */
 
-  NonConvertOptionFlag      = 0x1000,  /* Option not used by Convert */
+  NonConvertOptionFlag      = 0x1000,  /* Option not used by Convert/Magick */
   FireOptionFlag            = 0x4000,  /* Convert operation seq firing point */
   DeprecateOptionFlag       = 0x8000   /* Deprecate option, give warning */
 
index fbb9533c4534cc0161bbfbf727d1b7de2e637fd4..ea77fb818e6ac53dd8a39a0dc9f590afe66a0bcb 100644 (file)
@@ -418,7 +418,7 @@ static inline MagickBooleanType InsertImageInWand(MagickWand *wand,
     }
   wand->set_first = MagickFalse; /* flag no longer valid */
 
-  /* Current image was flaged as 'pending' iterative processing. */
+  /* Current image was flagged as 'pending' iterative processing. */
   if (wand->image_pending != MagickFalse)
     {
       /* current pending image is the last, append new images */
@@ -7734,7 +7734,7 @@ WandExport MagickBooleanType MagickRandomThresholdImage(MagickWand *wand,
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 %  MagickReadImage() reads an image or image sequence.  The images are inserted
-%  at the current image pointer position.
+%  jjust before the current image pointer position.
 %
 %  Use MagickSetFirstIterator(), to insert new images before all the current
 %  images in the wand, MagickSetLastIterator() to append add to the end,
index 0bc0a85e76f39ecd764e1a8739a86cf55ae0b5ba..a50013f6b1d2fa83ba4f9e3c7f491799b8a91d97 100644 (file)
@@ -842,7 +842,7 @@ WandExport void MagickResetIterator(MagickWand *wand)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   wand->images=GetFirstImageInList(wand->images);
   wand->set_first=MagickFalse;    /* we did not jump to the first image */
-  wand->image_pending=MagickTrue; /* this image is the 'next' image */
+  wand->image_pending=MagickTrue; /* pointed image is the 'next' image */
 }
 \f
 /*
@@ -858,6 +858,10 @@ WandExport void MagickResetIterator(MagickWand *wand)
 %
 %  MagickSetFirstIterator() sets the wand iterator to the first image.
 %
+%  Flags are set to point not only to the 'next' image to be processed,
+%  but also define where InsertImageInWand() (such as from MagickReadImage())
+%  should instert new images.
+%
 %  The format of the MagickSetFirstIterator method is:
 %
 %      void MagickSetFirstIterator(MagickWand *wand)
@@ -874,8 +878,8 @@ WandExport void MagickSetFirstIterator(MagickWand *wand)
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   wand->images=GetFirstImageInList(wand->images);
-  wand->set_first=MagickTrue;       /* we jumped to the first image */
-  wand->image_pending=MagickFalse;  /* but this image is not 'next' */
+  wand->set_first=MagickTrue;       /* we did jumped to the first image */
+  wand->image_pending=MagickFalse;  /* but we are not iterating */
 }
 \f
 /*
@@ -925,7 +929,7 @@ WandExport MagickBooleanType MagickSetIteratorIndex(MagickWand *wand,
     }
   wand->images=image;
   wand->set_first=MagickFalse;     /* we are not at very start of list */
-  wand->image_pending=MagickFalse; /* but it is not iteration pending */
+  wand->image_pending=MagickFalse;  /* but we are not directly iterating */
   return(MagickTrue);
 }
 /*
@@ -941,6 +945,10 @@ WandExport MagickBooleanType MagickSetIteratorIndex(MagickWand *wand,
 %
 %  MagickSetLastIterator() sets the wand iterator to the last image.
 %
+%  Flags are set to point not only to the 'previous' image to be processed,
+%  but also define where InsertImageInWand() (such as from MagickReadImage())
+%  should instert new images.
+%
 %  The format of the MagickSetLastIterator method is:
 %
 %      void MagickSetLastIterator(MagickWand *wand)
@@ -958,7 +966,7 @@ WandExport void MagickSetLastIterator(MagickWand *wand)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   wand->images=GetLastImageInList(wand->images);
   wand->set_first=MagickFalse;     /* we are not at very start of list */
-  wand->image_pending=MagickFalse; /* and is not iteration pending  */
+  wand->image_pending=MagickFalse;  /* but we are not iterating */
 }
 \f
 /*
index 0b6a106bcbd5f08f0c1e385f7e11a1208be2d184..58a53c54c7e6554a294f4aea59653f84bfa01bf7 100644 (file)
@@ -54,7 +54,6 @@
 #include "MagickCore/monitor-private.h"
 #include "MagickCore/thread-private.h"
 #include "MagickCore/string-private.h"
-#if 0
 \f
 /*
   Define declarations.
@@ -904,6 +903,9 @@ WandExport void WandSettingOptionInfo(MagickWand *wand,const char *option,
           ssize_t
             list;
 
+          /* FUTURE: This is not really a Setting Option, but a Special
+           * The bulk of this should be turned into a MagickCore function
+           */
           list=ParseCommandOption(MagickListOptions,MagickFalse,
                ArgOption("list"));
           switch (list)
@@ -1473,7 +1475,7 @@ WandExport void WandSettingOptionInfo(MagickWand *wand,const char *option,
 %
 %    count=ParseCommandOption(MagickCommandOptions,MagickFalse,argv[i]);
 %    flags=GetCommandOptionFlags(MagickCommandOptions,MagickFalse,argv[i]);
-%    if ( flags & SimpleOperatorOptionFlag != 0 )
+%    if ( (flags & SimpleOperatorOptionFlag) != 0 )
 %      WandSimpleOperatorImages(wand,
 %          ((*argv[i])=='+')?MagickTrue:MagickFalse,argv[i]+1,
 %          count>=1 ? argv[i+1] : (char *)NULL,
@@ -3351,9 +3353,8 @@ WandExport void WandSimpleOperatorImages(MagickWand *wand,
 %
 % Example usage...
 %
-%  WandListOperatorImages(wand,"read", MagickFalse,"rose:",NULL);
-%  WandListOperatorImages(wand,"duplicate",MagickFalse,"3",NULL);
-%  WandListOperatorImages(wand,"append",MagickTrue,NULL,NULL);
+%  WandListOperatorImages(wand,MagickFalse,"duplicate", "3",  NULL);
+%  WandListOperatorImages(wand,MagickTrue, "append",    NULL, NULL);
 %  if ( wand->exception->severity != UndefinedException ) {
 %    CatchException(exception);
 %    exit(1);
@@ -3366,7 +3367,7 @@ WandExport void WandSimpleOperatorImages(MagickWand *wand,
 %
 %    count=ParseCommandOption(MagickCommandOptions,MagickFalse,argv[i]);
 %    flags=GetCommandOptionFlags(MagickCommandOptions,MagickFalse,argv[i]);
-%    if ( flags & ListOperatorOptionFlag != 0 )
+%    if ( (flags & ListOperatorOptionFlag) != 0 )
 %      WandListOperatorImages(wand,
 %          ((*argv[i])=='+')?MagickTrue:MagickFalse,argv[i]+1,
 %          count>=1 ? argv[i+1] : (char *)NULL,
@@ -3431,6 +3432,7 @@ WandExport void WandListOperatorImages(MagickWand *wand,
 
           new_images=RemoveFirstImageFromList(&images);
           clut_image=RemoveLastImageFromList(&images);
+          /* FUTURE - produce Exception, rather than silent fail */
           if (clut_image == (Image *) NULL)
               break;
           (void) ClutImage(new_images,clut_image,images->interpolate,exception);
@@ -3471,8 +3473,10 @@ WandExport void WandListOperatorImages(MagickWand *wand,
 
           new_images=RemoveFirstImageFromList(&images);
           source_image=RemoveFirstImageFromList(&images);
+          /* FUTURE - produce Exception, rather than silent fail */
           if (source_image == (Image *) NULL)
             break;
+
           /* FUTURE - this should not be here! - should be part of -geometry */
           (void) TransformImage(&source_image,(char *) NULL,
             source_image->geometry,exception);
@@ -3617,6 +3621,7 @@ WandExport void WandListOperatorImages(MagickWand *wand,
 
            magnitude_image=RemoveFirstImageFromList(&images);
            phase_image=RemoveFirstImageFromList(&images);
+          /* FUTURE - produce Exception, rather than silent fail */
            if (phase_image == (Image *) NULL)
              break;
            new_images=InverseFourierTransformImage(magnitude_image,phase_image,
@@ -3936,17 +3941,6 @@ WandExport void WandListOperatorImages(MagickWand *wand,
     }
     case 'r':
     {
-      if (LocaleCompare("read",option) == 0)
-        {
-          CopyMagickString(image_info->filename,arg1,MaxTextExtent);
-          if (image_info->ping != MagickFalse)
-            new_images=PingImages(image_info,exception);
-          else
-            new_images=ReadImages(image_info,exception);
-          AppendImageToList(&images, new_images);
-          new_images=(Image *) NULL;
-          break;
-        }
       if (LocaleCompare("remap",option) == 0)
         {
               (void) RemapImages(quantize_info,images,(Image *) NULL,exception);
@@ -4068,4 +4062,3 @@ WandExport void WandListOperatorImages(MagickWand *wand,
 #undef exception
 #undef normal_op
 }
-#endif
index d0886f4ffb859dda7c492af5aae56631591ae462..05159841b59f04446d518cb5bbcdd169fbc58d0d 100644 (file)
           unrecognized color
         </message>
         <message name="UnrecognizedColorspace">
-          unrecognized image colorspace
+          unrecognized colorspace
         </message>
         <message name="UnrecognizedComposeOperator">
           unrecognized compose operator
index 0896d12118f10e97986986a48242f8ae76a503ed..7689835665a7e3b1ac0c909959c12ec4155385ef 100644 (file)
           couleur non reconnue
         </message>
         <message name="UnrecognizedColorspace">
-          espace colorimétrique de l'image non reconnu
+          espace colorimétrique non reconnu
         </message>
         <message name="UnrecognizedComposeOperator">
           opérateur de composition non reconnu