if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
image->filename);
+
+ /* Create tree if needed */
if (image->artifacts == (void *) NULL)
image->artifacts=NewSplayTree(CompareSplayTreeString,
RelinquishMagickMemory,RelinquishMagickMemory);
+ /* Delete artifact if NULL or empty */
if ((value == (const char *) NULL) || (*value == '\0'))
return(DeleteImageArtifact(image,artifact));
+ /* add option to tree */
status=AddValueToSplayTree((SplayTreeInfo *) image->artifacts,
ConstantString(artifact),ConstantString(value));
return(status);
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
image_info->filename);
- /* Delete Option if NULL */
- if (value == (const char *) NULL)
- return(DeleteImageOption(image_info,option));
-
/* This should not be here! - but others might */
if (LocaleCompare(option,"size") == 0)
(void) CloneString(&image_info->size,value);
image_info->options=NewSplayTree(CompareSplayTreeString,
RelinquishMagickMemory,RelinquishMagickMemory);
+ /* Delete Option if NULL */
+ if (value == (const char *) NULL)
+ return(DeleteImageOption(image_info,option));
+
/* add option and return */
return(AddValueToSplayTree((SplayTreeInfo *) image_info->options,
ConstantString(option),ConstantString(value)));