0

The example stated in as3-xmp-file is working with a .JPG format file. I tried to change the test.jpg to an test.png file. But it does not seems to update the title up into the the .png file.

Anyone have any ideas how can this be done?

Code from as3-xmp-file website

<?xml version="1.0" encoding="utf-8"?>
<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>
4

1 回答 1

0

找不到这个库的答案来写回代码,但我用这个问题给出的代码来代替它

于 2012-02-28T12:21:31.097 回答