flags=ParseGeometry(value,&geometry_info);
if (geometry_info.sigma != 0)
next->resolution.x=geometry_info.rho/geometry_info.sigma;
+ if (strchr(value,',') != (char *) NULL)
+ next->resolution.x=geometry_info.rho+geometry_info.sigma/1000.0;
(void) DeleteImageProperty(next,"exif:XResolution");
}
value=GetImageProperty(next,"exif:YResolution",exception);
flags=ParseGeometry(value,&geometry_info);
if (geometry_info.sigma != 0)
next->resolution.y=geometry_info.rho/geometry_info.sigma;
+ if (strchr(value,',') != (char *) NULL)
+ next->resolution.y=geometry_info.rho+geometry_info.sigma/1000.0;
(void) DeleteImageProperty(next,"exif:YResolution");
}
value=GetImageProperty(next,"tiff:ResolutionUnit",exception);
value=GetImageProperty(next,"exif:ResolutionUnit",exception);
if (value != (char *) NULL)
{
- next->units=(ResolutionType) (StringToLong(value)-1);
+ next->units=(ResolutionType) ParseCommandOption(MagickResolutionOptions,
+ MagickFalse,value);
(void) DeleteImageProperty(next,"exif:ResolutionUnit");
(void) DeleteImageProperty(next,"tiff:ResolutionUnit");
}
{ "Undefined", UndefinedResolution, UndefinedOptionFlag, MagickTrue },
{ "PixelsPerInch", PixelsPerInchResolution, UndefinedOptionFlag, MagickFalse },
{ "PixelsPerCentimeter", PixelsPerCentimeterResolution, UndefinedOptionFlag, MagickFalse },
+ { "1", UndefinedResolution, UndefinedOptionFlag, MagickFalse },
+ { "2", PixelsPerInchResolution, UndefinedOptionFlag, MagickFalse },
+ { "3", PixelsPerCentimeterResolution, UndefinedOptionFlag, MagickFalse },
{ (char *) NULL, UndefinedResolution, UndefinedOptionFlag, MagickFalse }
},
ResourceOptions[] =
ExceptionInfo *exception)
{
char
- key[MagickPathExtent];
+ key[MagickPathExtent],
+ property[MagickPathExtent];
MagickBooleanType
status;
if (recursive == MagickFalse)
WriteTo8BimProfile(image,name,profile);
}
+ /*
+ Inject profile into image properties.
+ */
+ (void) FormatLocaleString(property,MagickPathExtent,"%s:*",name);
+ (void) GetImageProperty(image,property,exception);
return(status);
}
info+=count;
length-=MagickMin(count,(ssize_t) length);
if ((id <= 1999) || (id >= 2999))
- (void) SetImageProperty((Image *) image,key,(const char *)
- attribute,exception);
+ (void) SetImageProperty((Image *) image,key,(const char *) attribute,
+ exception);
else
{
char
description=GetXMLTreeChild(rdf,"rdf:Description");
while (description != (XMLTreeInfo *) NULL)
{
+ char
+ *namespace;
+
node=GetXMLTreeChild(description,(const char *) NULL);
while (node != (XMLTreeInfo *) NULL)
{
content=GetXMLTreeContent(node);
if ((child == (XMLTreeInfo *) NULL) &&
(SkipXMPValue(content) == MagickFalse))
- (void) AddValueToSplayTree((SplayTreeInfo *) image->properties,
- ConstantString(GetXMLTreeTag(node)),ConstantString(content));
+ {
+ namespace=ConstantString(GetXMLTreeTag(node));
+ (void) SubstituteString(&namespace,"exif:","xmp:");
+ (void) AddValueToSplayTree((SplayTreeInfo *) image->properties,
+ namespace,ConstantString(content));
+ }
while (child != (XMLTreeInfo *) NULL)
{
content=GetXMLTreeContent(child);
if (SkipXMPValue(content) == MagickFalse)
- (void) AddValueToSplayTree((SplayTreeInfo *) image->properties,
- ConstantString(GetXMLTreeTag(child)),ConstantString(content));
+ {
+ namespace=ConstantString(GetXMLTreeTag(node));
+ (void) SubstituteString(&namespace,"exif:","xmp:");
+ (void) AddValueToSplayTree((SplayTreeInfo *) image->properties,
+ namespace,ConstantString(content));
+ }
child=GetXMLTreeSibling(child);
}
node=GetXMLTreeSibling(node);