Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否有一种使用imagemagick读取/写入XMP元数据的方法?_Imagemagick_Metadata_Xmp_Exiftool - Fatal编程技术网

是否有一种使用imagemagick读取/写入XMP元数据的方法?

是否有一种使用imagemagick读取/写入XMP元数据的方法?,imagemagick,metadata,xmp,exiftool,Imagemagick,Metadata,Xmp,Exiftool,我想读/写JPEG和PNG文件中的XMP元数据 我可以使用 但是,我无法使用imagemagick读取XMP元数据 ~ $ identify -verbose sample.png | grep "Description" 我之所以要编写XMP元数据,是因为它可以被Adobe产品读取 问题 是否有一种使用imagemagick读取/写入XMP元数据的方法 您想问的是“ImageMagick是否支持读取或写入XMP(描述性)元数据?”。从阅读来看,这个问题的答案是否定的。ImageMagick

我想读/写JPEG和PNG文件中的XMP元数据

我可以使用

但是,我无法使用imagemagick读取XMP元数据

~ $ identify -verbose sample.png | grep "Description"
我之所以要编写XMP元数据,是因为它可以被Adobe产品读取

问题

  • 是否有一种使用imagemagick读取/写入XMP元数据的方法
您想问的是“ImageMagick是否支持读取或写入XMP(描述性)元数据?”。从阅读来看,这个问题的答案是否定的。ImageMagick(几乎)读取文件中的所有元数据,但不读取描述性元数据


如果出于某种原因必须使用ImageMagick来提取XMP元数据,则可以尝试包含一个过滤器。要处理图像文件,但它们不是ImageMagick本身的一部分。

转换-ping yourimage.jpg XMP:-

访问XMP数据可以按如下方式进行:

ImageMagick.XmpProfile xmp = image.GetXmpProfile();

Console.WriteLine("\n\n----> xmp:" + xmp);
if (xmp != null)
{
    you have to process the XML data of the XMPs result.  
    ie. use XPATH or some other XML interface.
}

不太正式,但与Adobe产品的兼容性并不是想要操作XMP元数据的唯一原因。png不支持元数据-->这仅与EXIF元数据有关(尽管Exiftool和Exiv2有解决办法)。PNG确实支持XMP元数据编辑:呸,没有检查日期
ImageMagick.XmpProfile xmp = image.GetXmpProfile();

Console.WriteLine("\n\n----> xmp:" + xmp);
if (xmp != null)
{
    you have to process the XML data of the XMPs result.  
    ie. use XPATH or some other XML interface.
}