MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
- char
- property[MaxTextExtent];
-
const char
- *option,
- *value;
+ *option;
GeometryInfo
geometry_info;
}
ResetImageOptionIterator(image_info);
#if 0
- /* IMv6: Copy freeform global options into per-image artifacts, so
- * various operations and coders can access them.
- * This has a problem, as artifacts may be set in parenthesis, but may
- * not be unset when parenthesis ends.
- */
- for (option=GetNextImageOption(image_info); option != (const char *) NULL; )
{
- value=GetImageOption(image_info,option);
- if (value != (const char *) NULL)
- {
- (void) FormatLocaleString(property,MaxTextExtent,"%s",option);
- (void) SetImageArtifact(image,property,value);
- }
- option=GetNextImageOption(image_info);
+ char
+ property[MaxTextExtent];
+
+ const char
+ *value;
+
+ /* IMv6: Copy freeform global options into per-image artifacts, so
+ * various operations and coders can access them.
+ * This has a problem, as artifacts may be set in parenthesis, but may
+ * not be unset when parenthesis ends.
+ */
+ for (option=GetNextImageOption(image_info); option != (const char *) NULL; )
+ {
+ value=GetImageOption(image_info,option);
+ if (value != (const char *) NULL)
+ {
+ (void) FormatLocaleString(property,MaxTextExtent,"%s",option);
+ (void) SetImageArtifact(image,property,value);
+ }
+ option=GetNextImageOption(image_info);
+ }
}
#else
/* IMv7: pointer for lookup of artifact fallback, back to global option.
WARNING: When a global option is set, any associated per-image artifact
should also be unset, as no longer valid.
*/
- image->image_info = image_info;
+ image->image_info = CloneImageInfo(image_info);
#endif
return(MagickTrue);
}