Cristy
2026-04-09 13:22:00 -04:00
parent 1c7767fc5f
commit 5facfecf1a
+20 -9
View File
@@ -1886,7 +1886,10 @@ static void GetXMPProperty(const Image *image,const char *property)
while (description != (XMLTreeInfo *) NULL)
{
char
*xmp_namespace;
*property;
size_t
property_length;
node=GetXMLTreeChild(description,(const char *) NULL);
while (node != (XMLTreeInfo *) NULL)
@@ -1896,20 +1899,28 @@ static void GetXMPProperty(const Image *image,const char *property)
if ((child == (XMLTreeInfo *) NULL) &&
(SkipXMPValue(content) == MagickFalse))
{
xmp_namespace=ConstantString(GetXMLTreeTag(node));
(void) SubstituteString(&xmp_namespace,"exif:","xmp:");
(void) AddValueToSplayTree((SplayTreeInfo *) image->properties,
xmp_namespace,ConstantString(content));
property=ConstantString(GetXMLTreeTag(node));
(void) SubstituteString(&property,"exif:","xmp:");
property_length=strlen(property);
if ((property_length <= 2) || (*(property+(property_length-2)) != ':') ||
(*(property+(property_length-1)) != '*'))
(void) AddValueToSplayTree((SplayTreeInfo *) image->properties,
ConstantString(property),ConstantString(content));
property=DestroyString(property);
}
while (child != (XMLTreeInfo *) NULL)
{
content=GetXMLTreeContent(child);
if (SkipXMPValue(content) == MagickFalse)
{
xmp_namespace=ConstantString(GetXMLTreeTag(node));
(void) SubstituteString(&xmp_namespace,"exif:","xmp:");
(void) AddValueToSplayTree((SplayTreeInfo *) image->properties,
xmp_namespace,ConstantString(content));
property=ConstantString(GetXMLTreeTag(node));
(void) SubstituteString(&property,"exif:","xmp:");
property_length=strlen(property);
if ((property_length <= 2) || (*(property+(property_length-2)) != ':') ||
(*(property+(property_length-1)) != '*'))
(void) AddValueToSplayTree((SplayTreeInfo *) image->properties,
ConstantString(property),ConstantString(content));
property=DestroyString(property);
}
child=GetXMLTreeSibling(child);
}