]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authoranthony <anthony@git.imagemagick.org>
Fri, 11 May 2012 01:56:24 +0000 (01:56 +0000)
committeranthony <anthony@git.imagemagick.org>
Fri, 11 May 2012 01:56:24 +0000 (01:56 +0000)
MagickCore/resample.c
MagickCore/utility.c
MagickWand/magick-cli.c
MagickWand/operation.c

index a7e8eba994219987c6ef861165742f6932260e36..5d7af2f819a004a70dbfe37998708b30b5535fee 100644 (file)
@@ -1323,7 +1323,7 @@ MagickExport void SetResampleFilter(ResampleFilter *resample_filter,
   #pragma omp single
 #endif
   {
-    if (IsStringTrue(GetImageArtifact(resample_filter->image,
+    if (IfStringTrue(GetImageArtifact(resample_filter->image,
              "resample:verbose")) )
       {
         register int
index 3de0414b77bc667cb9bd24b40e86b7d4ee7dd3ff..f17056da18439e1f3813f2192008c36f63a61133 100644 (file)
@@ -699,6 +699,16 @@ MagickPrivate void ExpandFilename(char *path)
 %  Expansion is ignored for coders "label:" "caption:" "pango:" and "vid:".
 %  Which provide their own '@' meta-character handling.
 %
+%  You can see the results of the expansion using "Configure" log
+%  events.
+%
+%
+%  The returned list should be freed using  DestroyStringList().
+%
+%  However the strings in the original pointed to argv are not
+%  freed  (TO BE CHECKED).  So a copy of the original pointer (and count)
+%  should be kept separate if they need to be freed later.
+%
 %
 %  The format of the ExpandFilenames function is:
 %
index 66c9e4c420665b96f19ba389a87802b16a79b849..1430422ccc46edb81b2eabfa8377c21b1b8305a9 100644 (file)
@@ -686,7 +686,7 @@ static MagickBooleanType ConcatenateImages(int argc,char **argv,
   register ssize_t
     i;
 
-  if (IfMagickFalse(ExpandFilenames(&argc,&argv)))
+  if (IfMagickFalse(  ExpandFilenames(&argc,&argv)  ))
     ThrowFileException(exception,ResourceLimitError,"MemoryAllocationFailed",
          GetExceptionMessage(errno));
 
@@ -725,13 +725,6 @@ WandExport MagickBooleanType MagickImageCommand(ImageInfo *image_info,
   /* For specific OS command line requirements */
   ReadCommandlLine(argc,&argv);
 
-#if 0
-  status=ExpandFilenames(&argc,&argv);
-  if ( IfMagickFalse(status) )
-    ThrowConvertException(ResourceLimitError,"MemoryAllocationFailed",
-      GetExceptionMessage(errno));
-#endif
-
   /* Initialize special "CLI Wand" to hold images and settings (empty) */
   cli_wand=AcquireMagickCLI(image_info,exception);
   cli_wand->line=1;
index cff6f2b8fbf8e1072798288459f75a31c5184047..e4cf41f8b18777daddd5205f64218bba416f3df1 100644 (file)
@@ -4279,7 +4279,6 @@ WandExport void CLINoImageOperator(MagickCLI *cli_wand,
      ( LocaleCompare("--",option) == 0 ) ) {
 #if 0
     /* Directly read 'arg1' without filename expansion handling (see below).
-       This does NOT turn off the 'coder:' prefix, or '[...]' read modifiers.
     */
 # if !USE_WAND_METHODS
     Image    *new_images;
@@ -4318,7 +4317,11 @@ WandExport void CLINoImageOperator(MagickCLI *cli_wand,
     argc = 1;
     argv = (char **) &arg1;
 
-    if (IfMagickFalse(ExpandFilenames(&argc,&argv)))
+    /* Expand 'glob' expressions in the given filename.
+       Expansion handles any 'coder:' prefix, or read modifiers attached
+       to the filename, including them in the resulting expanded list.
+    */
+    if (IfMagickFalse(  ExpandFilenames(&argc,&argv)  ))
       CLIWandExceptArgReturn(ResourceLimitError,"MemoryAllocationFailed",
           option,GetExceptionMessage(errno));
 
@@ -4335,8 +4338,7 @@ fprintf(stderr, "DEBUG: Reading image: \"%s\"\n", argv[i]);
         new_images=ReadImages(_image_info,argv[i],_exception);
       AppendImageToList(&_images, new_images);
     }
-    /* FUTURE: how do I free the expanded filename array memory ??? */
-    //argv=DestroyStringList(argv);  /* Is this correct? */
+    argv=DestroyStringList(argv);  /* Destroy the Expanded Filename list */
 #endif
     return;
   }