如何从 Photoshop 滤镜插件 (Photoshop SDK) 访问 exif 数据字段
我正在寻找一条非常具体的信息。我想我可以提出一个相当详细的问题,但我宁愿尝试使其简短明了。 我需要从 Photoshop 滤镜插件中访问一段元数据(exif 信息)。我从未处理过 Photoshop 插件内部或外部的 exif 数据,而且 PS SDK 文档的形式留下了很多问题。我最终会到达那里,但想知道这里是否有人以前做过这件事并且可以帮助我举个例子。我将非常感激...
我们需要的内容应该记录在 SDK 中:
documentation/html/group___resource_suite.html
documentation/html/imageresourcessection.html
后一个文档说我检索 exif 数据所需的资源 ID 是 1059(十进制)并且支持访问 Exif 数据,因为PS 7.0 很好。但是 SDK 没有(我发现的)关于你得到什么的信息,指针?指向什么的指针?他们只是告诉你查看 exif 规范。那么我是否可以获得指向 RAW 二进制 exif 数据的指针,如果是的话如何从中提取字段。
Exif 数据的规范如下: 作为一个
例子,我想了解这个 exif场地:
Tag Name Field Name Dec Hex Type Count
Image title ImageDescription 270 10E ASCII Any
I'm looking for a very specific piece of information. I could make this a rather detailed question I guess but I'd rather try keeping it short and to the point.
I need to acces a piece of meta data (exif information) from within a Photoshop filter plug-in. I have never dealt with exif data from within a Photoshop plug-in or without and the PS SDK documentation is of a form that leaves a lot of questions. I would eventually get there but was wondering if anyone here has done this before and could help me out with an example. I'd be very grateful for that...
What we need should be documented here in the SDK:
documentation/html/group___resource_suite.html
documentation/html/imageresourcessection.html
The latter document says that the resource ID I need to retrieve the exif data is 1059 (decimal) and that accessing Exif data is supported since PS 7.0 which is good. But the SDK has no information (that I found) as to what you get, pointer? pointer to what? They just tell you to look at the exif spec. So do I get a pointer to the RAW binary exif data and if so how to I extract a field from that.
The specifications for the Exif data are here:
http://exif.org/specifications.html
As an example I'd like to get at this exif field:
Tag Name Field Name Dec Hex Type Count
Image title ImageDescription 270 10E ASCII Any
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
编辑:经过更深入的研究,我发现了以下内容(文档摘录):
文档:Photoshop API 指南。
参数:回调。
这些套件由指向记录的指针来描述,该记录包含:
您对属性套件感兴趣。
当前版本:1; Adobe Photoshop:5.0;例程: 2.
属性由签名和密钥标识,它们形成一对
识别感兴趣的财产。
Adobe Photoshop 的签名始终为“8BIM”(0x3842494D)。
EXIF 属性由 2000 年 11 月合并的日本电子工业振兴协会 (JEIDA) 和日本电子工业协会 (EIAJ) 控制。 EXIF 规范可以从其网站的以下位置下载。
http://it.jeita.or.jp/jhistory/document /standard/exif_eng/jeida49eng.htm
此例程允许您获取有关当前正在处理的文档的信息。
回顾一下,我将编写一些有趣的代码:
EDIT: After a deeper research I've found the following (an excerpt from the documentation):
Document: Photoshop API Guide.
Argument: Callbacks.
The suites are described by a pointer to a record containing:
You are interested in the Property suite.
Current version: 1; Adobe Photoshop: 5.0; Routines: 2.
Properties are identified by a signature and key, which form a pair to
identify the property of interest.
Adobe Photoshop’s signature is always '8BIM' (0x3842494D).
The EXIF property is controlled by The Japan Electronic Industry Development Association (JEIDA) and Electronic Industries Association of Japan (EIAJ) which merged in Novemeber of 2000. The EXIF specification can be downloaded from their web site at the following location.
http://it.jeita.or.jp/jhistory/document/standard/exif_eng/jeida49eng.htm
This routine allows you to get information about the document currently being processed.
To recap I'll write some juicy code:
以下是使用 Exiv2 库的代码示例:http://www.exiv2.org/doc/exifprint_8cpp-example.html
Here's is a code sample using the Exiv2 Library: http://www.exiv2.org/doc/exifprint_8cpp-example.html
我结合了响应 vulkanino 和 ThdK 。我的方法使用 PropertyUtils.h 文件中声明的函数 PIGetEXIFData 返回二进制 exif。接下来,这个 exif 解码的 Exiv2 库
I combined response vulkanino and ThdK. My method uses the function PIGetEXIFData declared in file PropertyUtils.h that returns a binary exif. Next, this exif decoded Exiv2 library