如何使用PHP在图像文件中添加关键字?

问题描述

我尝试用这种方法添加关键字

//echoing the img to check the path
echo "<img src='uploads/Background597x1050px.jpg'>";

//creating the object and use of setImageProperty method to add keywords
$imgi = new Imagick('uploads/Background597x1050px.jpg');
$imgi->setImageProperty('keywords','test');

当我下载图片时,关键字部分什么也没有出现(法语截图)

enter image description here

编辑:我也尝试过 iptcembed 方法,但是 iptcparse 返回的标签只是那些,如果我从 windows 属性添加了标签,它们不会返回,而是带有 {{仅 1}} 而不是 exif_read_data

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)