mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-25 11:24:54 +02:00
This commit is contained in:
+20
-9
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user