【发布时间】:2011-11-05 03:12:25
【问题描述】:
我尝试使用AS3-XMP Library 读取文件的元数据,但我不知道使用什么方法。
无论如何,有人有任何可行的例子吗?以便我可以从中学习? 我设法读取了所有 TIFF 结构/标签数据,但我想知道如何编写它。
【问题讨论】:
标签: actionscript-3 apache-flex flash-builder xmp
我尝试使用AS3-XMP Library 读取文件的元数据,但我不知道使用什么方法。
无论如何,有人有任何可行的例子吗?以便我可以从中学习? 我设法读取了所有 TIFF 结构/标签数据,但我想知道如何编写它。
【问题讨论】:
标签: actionscript-3 apache-flex flash-builder xmp
你关注所有instructions here了吗?查看代码示例的 init 函数以了解“我如何使用它”的原因。
我将重复以下完整说明:
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import de.qwesda.as3_xmp_file.as3_xmp_file;
import com.adobe.xmp.*;
private function init():void {
var file1:as3_xmp_file = new as3_xmp_file(File.desktopDirectory.nativePath + "/test.jpg");
if(file1.file.exists){
trace(file1.xmp.dumpObject());
var dc_exif:Namespace = XMPConst.dc;
file1.xmp.dc_exif::title = "Title";
file1.save();
}
var file2:as3_xmp_file = new as3_xmp_file(File.desktopDirectory.nativePath + "/test.jpg");
if(file2.file.exists){
trace(file2.xmp.dumpObject());
}
}
]]>
</mx:Script>
</mx:WindowedApplication>
【讨论】: