如何向PNG添加额外的元数据? [英] How to add extra meta data to PNG?
本文介绍了如何向PNG添加额外的元数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法将一些额外的元数据添加到PNG文件然后用PHP检索?
is there a way to add some extra metadata to a PNG file and then retrieve it with PHP ?
如评论字段。
推荐答案
如果您安装了ImageMagick,它会附带两个实用程序:mogrify和identify。
If you have ImageMagick installed, it comes with two utilities: mogrify and identify.
要添加评论:
$ mogrify.exe -comment "My test comment" plogo.png
要检索评论:
$ identify.exe -verbose plogo.png | grep -i "comment:"
comment: My test comment
我不知道如果mogrify / identify函数可用作PHP库,但你总是可以使用php system
命令。
I don't know if mogrify/identify functions are available as PHP libraries, but you can always use the php system
command.
这篇关于如何向PNG添加额外的元数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文