如何使用PHP从图像文件读取Lightroom关键字? [英] How to read Lightroom keywords from image file using PHP?

查看:119
本文介绍了如何使用PHP从图像文件读取Lightroom关键字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个照片社区( www.jungledragon.com ),该社区允许用户上传照片.我的平台是PHP/CodeIgniter.

I have a photo community (www.jungledragon.com) that allows users to upload photos. My platform is PHP/CodeIgniter.

作为上传过程的一部分,我已经在使用PHP的 exif_read_data 函数读取EXIF信息,该函数运行正常.我阅读了相机的详细信息,并将其显示在信息"标签上.

As part of the upload process I'm already reading EXIF info using PHP's exif_read_data function, which works fine. I read camera details and show these on an info tab.

最重要的是,用户应该在上传照片后在网站上手动设置照片标题,描述和标签.但是,某些用户在其图像管理程序中管理这些字段,例如Lightroom.如果我也能阅读这些内容,那就太好了,上传将变得非常有趣.

On top of that, user's are expected to manually set the photo title, description and tags on the website after uploading the photo. However, some users manage these fields in their image management program, for example Lightroom. It would be great if I could read those as well, uploading would become a total joy.

我已经改进了EXIF的阅读功能,以读取标题",这样,用户上传后就不必再设置图像标题了.现在,我希望阅读关键字,这就是我遇到的问题.这是Lightroom中图像的部分屏幕截图:

I already improved my EXIF reading to read the "caption", this way users don't have to set the image title after uploading anymore. Now I'm looking to read keywords, which is where I am stuck. Here's a partial screenshot of an image in Lightroom:

我可以读取元数据,但是如何阅读关键字?它不在元数据中的事实使我怀疑它是否完全可能?我尝试使用exif_read_data读取我可以获得的每个值(ANY_TAG,IFD0,EXIF,APP12),但是找不到关键字.

I can read the Metadata, but how do I read the keywords? The fact that it is not inside metadata makes me wonder if it's at all possible? I've tried reading every value I can get (ANY_TAG, IFD0, EXIF, APP12) using exif_read_data, but the keywords are not to be found.

有什么想法吗?

推荐答案

如建议的那样,您可能必须使用另一种读取元数据的方法.

As suggested you may have to use another method of reading metadata.

http://www.foto-biz.com/Lightroom/Exif-vs-iptc-vs-xmp

图像关键字可以存储在IPTC中,而不存储在EXIF中.我不知道是否有用于读取iptc的标准平台方法,但是快速的Google会显示此信息

Image keywords may be stored in IPTC and not in EXIF. I don't know if there is a standard platform method for reading iptc but a quick google shows this

http://php.net/manual/en/function.iptcparse.php

这篇关于如何使用PHP从图像文件读取Lightroom关键字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆