#pragma omp single
#endif
{
- if (IsStringTrue(GetImageArtifact(resample_filter->image,
+ if (IfStringTrue(GetImageArtifact(resample_filter->image,
"resample:verbose")) )
{
register int
% 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:
%
register ssize_t
i;
- if (IfMagickFalse(ExpandFilenames(&argc,&argv)))
+ if (IfMagickFalse( ExpandFilenames(&argc,&argv) ))
ThrowFileException(exception,ResourceLimitError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
/* 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;
( 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;
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));
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;
}