How to read XMP metadata from a Jpeg

This seems like it should be a no-brainer, but I can't find any classes to do this ?? I can find classes to read song titles from MP3 files, I want to do similar with jpeg image files.
In photoshop and lightroom you can set up titles and captions (and copyright info) in the metadata. When you save a jpeg this gets embedded in the file.
How to read this info and parse it and use it once you have loaded it into a BitMapData???
I am Flash/AS3.0 code only no IDE -  please no flex/AIR examples!
Thanks!

http://www.adobe.com/devnet/xmp/

Similar Messages

  • How to read XMP metadata of an indd file using Actionscript

    Hi All,
    I am trying to read XMP metadata of an indd file using CS Extension Builder in Flash Builder 4.5.
    The documentation has many class like XMPmeta, XMPStruct, etc.
    I have got the currently opened document in InDesign as follows:
    var myDoc:Document = InDesign.app.activeDocument();
    And a new XMPmeta object is created as follows:
    var myXMP:XMPMeta = new XMPMeta();
    How to initialize document's xmp metadata in the XMPMeta object? Or is there any other way to get the XMP metadata of currently opened document in InDesign?

    I have found that the XMP data of an InDesign document can be retrieved in actionscript as follows:
    InDesign.app.activeDocument.metadataPreferences
    This returns the MetadataPreference object.
    But I am not able to iterate each namespace in the xmp. There isn't any XMPFile class which allows me to serialize the object to xml file so that I can iterate all elements in the XMP.
    I could not relate class like XMPMeta, XMPProp, etc. with the MetaDataPreference class. So, how to obtain the entire xmp packet from the MetadataPreference object?
    Can anyone shed light on this?

  • Adding/Reading XMP Metadata in a psd file

    Hi,
    I'm having some troubles to understand how to add and read XMP metadata on a psd file. I followed the Panel developer guide tutorial, and try to look on the internet for some answers, but I'm still stuck ...
    Here is the simple example I'm trying to make (using part of the code from the panel developer guide) :
         The function loads the XMP Script Library.
         @returns True if the XMP Script Library was loaded successfully.
         @type Boolean
    function loadXMPLibrary(){
         if ( !ExternalObject.AdobeXMPScript ){
              try{
                   ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
              }catch (e){
                   alert("Can't load XMP Script Library");
                   return false;
         return true;
         The function unloads the XMP Script Library.
    function unloadXMPLibrary(){
         if( ExternalObject.AdobeXMPScript ) {
              try{
                   ExternalObject.AdobeXMPScript.unload();
                   ExternalObject.AdobeXMPScript = undefined;
              }catch (e){
                   alert("Can't unload XMP Script Library");
        Try to put a new property into the metadata
    if( app.activeDocument || !loadXMPLibrary()){
        var xmp = new XMPMeta(activeDocument.xmpMetadata.rawData);
        xmp.setProperty( XMPConst.NS_EXIF, "myProperty", "test" );
        activeDocument.xmpMetadata.rawData = xmp.serialize();
        unloadXMPLibrary();
        Window.alert(activeDocument.xmpMetadata.rawData);
    I don't really know where I'm wrong, could you help me please ?
    Thanks,
    Julien

    Rather mess with EXIF and Dublin Core namespaces, wouldn't it be better to create your own?
    IE:
    #target photoshop
    addtoMeta();
    function addtoMeta(){
    if(!documents.length) return;
    if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
    var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);
    var myNamespace = "http://my.fantastic.newspace/";
    var myPrefix = "nsfns:";
    XMPMeta.registerNamespace(myNamespace, myPrefix);
    xmp.setProperty(myNamespace, "myProperty", "A Test String");
    app.activeDocument.xmpMetadata.rawData = xmp.serialize();

  • C++ code to get XMP metadata from pdf files ??

    Hi,
    I am new to this field and now I have to write a C++ code which will read the XMP metadata from any pdf files. Could anyone please tell me how to do that or where to start? Is there any sample code available for that?
    I am reading the Programmer's guide and XMP specification to have the whole idea.
    I really appriciate your help. Thanks in advance.
    Regards,
    Suranjit Paul

    Hi,
    The same code for reading other formats will go for Pdf too.
    Only difference is while reading PDF it is not calling any smart filters.

  • Extract XMP metadata from specific Photoshop Layer in After Effects

    How do it extract XMP metadata from specific Photoshop Layer in After Effects?
    I am just getting my hands dirty with metadata.
    I know it is possible to attack metadata to a layer/layerset in Photoshop, but how to I get it out in After Effects.
    Here is the process.
    I create BunchaLayers.psd.
    Using the PerLayerMetaData.jsx file attached.
    I use the setCommMetadata("something") function to attacked metadata to a selected layer.
    I know that is is there because I check it using the exportLayerMetadata().
    I save and imprt BunchaLayers.psd into AE as a comp.
    Here I am lost.
    I select my layer in the project window and check the XMP metadata window.
    I can't find my comment.
    Is the XMP data actually attached to the layer I imported in AE?
    I want to be able to select the layer and see that the data is attached.  Is this possible?
    If it is will it work on layersets (comps in AE)?
    I would appreciate any layer specific XMP insight.
    Thanks for looking.
    - Josh

    John Nack on Adobe : Per-layer metadata comes to Photoshop
    This was the article that made me think this might be possible.
    There is also the preference to Create Markers From Metadata
    ["Metadata"]
              "CreateLayerMarkersFromFootageXMP" = 01
    Which made me wonder if there is a way to create the metadata in the first place that made it something AE would read and automatically change to layer markers.
    Any ideas?

  • Can't parse XMP metadata from files

    Hello,
    I am currently having troubles reading custom metadata from a file.
    I wrote a really simple test case to show you that, maybe I'm doing something wrong...
    Writing a simple property :
    static const char * kNS1 = "ns:test1/";
    void Foo::writeSimple()
        if( !SXMPMeta::Initialize() )
            LOGIT( LOG_ERROR, "Could not initialize XMP toolkit!" );
            return;
        // custom schema
        std::string actualPrefix;
        bool ret = SXMPMeta::RegisterNamespace( kNS1, "ns1", &actualPrefix );
        XMP_OptionBits options = 0;
        // Must initialize SXMPFiles before we use it
        if ( !SXMPFiles::Initialize( options ) )
            LOGIT( LOG_ERROR, "Could not initialize SXMPFiles!");
            return;
        try
            SXMPMeta meta;
            std::string value;
            meta.SetProperty( kNS1, "name", "value" );
            // just to check the property gets actuelly written in meta
            bool exists = meta.GetProperty( kNS1, "name", &value, 0 );
            std::cout << "writeRead: " << value << std::endl; // output is ok
            // Options to open the file with - open for editing and use a smart handler
            XMP_OptionBits opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUseSmartHandler;
            std::string status = "";
            // First we try and open the file
            bool ok = p_private->m_file.OpenFile( "Collines.jpg", kXMP_UnknownFile, opts );
            // Check we can put the XMP packet back into the file
            if( p_private->m_file.CanPutXMP( meta ) )
                    // If so then update the file with the modified XMP
                    p_private->m_file.PutXMP( meta );
            else
                LOGIT( LOG_ERROR, "PutXMP: cannot put XMP" );
            p_private->m_file.CloseFile();
            SXMPFiles::Terminate();
            SXMPMeta::Terminate();
        catch( XMP_Error& e )
            LOGIT( LOG_EXCEPTION, "writeSimple: " + std::string(e.GetErrMsg()) );
    Reading the property:
    void Foo::readSimple()
        if( !SXMPMeta::Initialize() )
            LOGIT( LOG_ERROR, "Could not initialize XMP toolkit!" );
            return;
        // custom schema
        std::string actualPrefix;
        bool ret = SXMPMeta::RegisterNamespace( kNS1, "ns1", &actualPrefix );
        XMP_OptionBits options = 0;
        // Must initialize SXMPFiles before we use it
        if ( !SXMPFiles::Initialize( options ) )
            LOGIT( LOG_ERROR, "Could not initialize SXMPFiles!");
            return;
        try
            // Options to open the file with - open for editing and use a smart handler
            XMP_OptionBits opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUseSmartHandler;
            std::string status = "";
            // First we try and open the file
            bool ok = p_private->m_file.OpenFile( "Collines.jpg", kXMP_UnknownFile, opts );
            // Check we can put the XMP packet back into the file     
            SXMPMeta meta;
            std::string xmpPacket;
            XMP_PacketInfo packetInfo;
            ok = p_private->m_file.GetXMP( &meta, &xmpPacket, &packetInfo );
            std::cout << "DBG: getXMP: " << xmpPacket << std::endl; // output is ok, I can see what I wrote before
            std::string value;       
            bool exists = meta.GetProperty( kNS1, "name", &value, 0 ); // returns false...
            std::cout << "writeRead: " << value << std::endl; // nothing in value
            p_private->m_file.CloseFile();
            SXMPFiles::Terminate();
            SXMPMeta::Terminate();
        catch( XMP_Error& e )
            LOGIT( LOG_EXCEPTION, "readSimple: " + std::string(e.GetErrMsg()) );
    Do you have any idea?
    Thanks in adavance!
    Chris.

    Hello? No one has any idea?

  • How to import XMP metadata in pdf

    Could you please explain me, how to import XMP metadata in pdf file through "Live Cycle ES"?

    Yes, with LiveCycle ES (almost) all services can be invoked from any of the available endpoints (watch folder, EJB, WebService, etc).
    In this case since the ImportXMP requires two input files (the PDF and the XMP) you will need to drop a directory containing both of your files into the watch folder (not the individual files). This is because several requests can be dropped into the watch folder at the same time and without the sub directories LiveCycle couldn't tell what XMP when with what PDF.
    A com.adobe.idp.Document - AKA: Document - object is one of the common object types used across all LiveCycle products. When you deal with PDFs and many other binary file objects they are stored a Document object. It is more important that you know this when using Workbench, web services or the Java API.
    You should have a look at the documentation at: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/001553.html

  • Import XMP Metadata From File

    In Beta4, the Import XMP Metadata From File command would import data found in an xmp file.
    In V1, it's not working...or am I missing something.
    (I do understand that Export XMP to File will write the data into the image file itself.)
    Ideas?
    Pete

    Here's a sample xmp I created...in case it's wrong..but it was working in B4.<br /><br /><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Toolkit 3.3-016, build -num-, -date-"><br /> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><br />   <rdf:Description rdf:about=""<br /> xmlns:dc="http://purl.org/dc/elements/1.1/"><br />    <dc:description><br />     <rdf:Alt><br />      <rdf:li xml:lang="x-default">: Geese at sunset. Finley National Wildlife Refuge, Oregon</rdf:li><br />     </rdf:Alt><br />    </dc:description><br />    <dc:creator><br />     <rdf:Seq><br />      <rdf:li xml:lang="x-default">Peter K. Ziminski</rdf:li><br />     </rdf:Seq><br />    </dc:creator><br />    <dc:rights><br />     <rdf:Alt><br />      <rdf:li xml:lang="x-default">Peter K. Ziminski</rdf:li><br />     </rdf:Alt><br />    </dc:rights><br />    <dc:subject><br />     <rdf:Bag><br />      <rdf:li>Sunrises and Sunsets</rdf:li><br />      <rdf:li>Birds</rdf:li><br />      <rdf:li>Landscapes</rdf:li><br />      <rdf:li>Animals</rdf:li><br />      <rdf:li>Oregon</rdf:li><br />      <rdf:li>Finley National Wildlife Refuge</rdf:li><br />     </rdf:Bag><br />    </dc:subject><br />   </rdf:Description><br />   <rdf:Description rdf:about=""<br />    xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"><br />     <Iptc4xmpCore:Location>Finley National Wildlife Refuge, Oregon</Iptc4xmpCore:Location><br />    </rdf:Description><br /> </rdf:RDF><br /></x:xmpmeta>

  • How to import XMP Metadata?

    Could you please explain me, how to import XMP metadata in pdf file through "Live Cycle ES"?

    > Please give any samples.
    As I said, the samples are in the API Reference. All you have to do is look them up.

  • How to read the file from a folder.

    Hi All,
    How to read the file from a folder or directory from the non sap server / remote server.
    Regards
    Sathis

    open dataset filename for input in text mode
                         encoding default.
    filename is character type variable with the destination filename.
    Edited by: Jino Augustine on Apr 19, 2010 1:31 PM

  • How to read a data from USB port using JAVA

    hi all,
    i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
    Advance Thanks!!

    You can do this. Please use this link
    [http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
    What research did you do of your own? Have you done some testing application and tried yourself??

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How to read Group ID from Value Mapping Context in Cache Monitoring ?

    Hi friends,
        In RWB --> Cache Monitoring --> Integration Server (Java) -> (Search for Value Mapping Groups) in this each item is identified by Value Mapping Group (GroupID, Context, Identifier/Agency, Identifier/Scheme). Either we create Value Mapping Table in ID or replicate value mapping data directly from text file/SAP table etc., in run time cache, data will be identified in this manner.
        Now, our requirement is to delete a record the Cache for a particular context. Two operations provided by XI one is 'Delete' and another one is 'DeleteGroup'. When we use either of this, we should know GroupID. Suppose, I replicated some large amount of data from my text file in Runtime Cache. Value Mapping Table is like that IN --> India, US --> USA, AU --> Australia, EG --> Egypt. Now, I am required to write a program to get the input country code from user which is going to delete in the value mapping table like IN/AU....  For this, what logic we should follow in the program is, First we scan the value mapping table and find the record (country code)  which is match with the input. Then find the GUID value for this record. Now we use the DeleteGroup Operation and pass this GUID and then delete the record.
        So, in essence, how to read the GUID from value mapping context.
        Friends, Kindly help me to do this.
    Thanks in advance.
    Jegatheeswaran P.

    Did you get the way to read group id?

  • How 2 read two files from 2 diff. directories, using single adapter

    How 2 read two files from 2 diff. directories in same system, using single file adapter.

    you can use advanced selection for source file
    see
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm

  • How to read a mail from sap inbox thru abap code?

    how to read a mail from sap INBOX thru abap code? can anyone tell me the technical approach? I NEED TO READ A MAIL and then need to pass the parameters to a bapi.
    Message was edited by:
            shahid mohammed syed

    Hi SSM,
    Did you manage to have your program working? I also have same requirement. I tried standard FM and BAPI but I always encounter authorization error when I tried accessing other user's mail. Thanks.
    Regards,
    Ryan

Maybe you are looking for

  • Has the odcustomurl.js file (for Gateway page) been renamed in UPK 11.1?

    We just upgraded from UPK 3.6.1 to UPK 11.1. I ran the inappconfig.cmd to customize our Gateway page, and I was looking for the "odcustomurl.js" file that it's supposed to generate. However, it did not generate that javascript file, instead, it gener

  • Videos don't play until fully buffered?

    Every video i try to play doesn't actually start till the video is fully buffered. It's not so bad if its a 2 min video but if im trying to watch a movie or a long youtube video i have to wait ages till it'll actually work. any suggestions on how to

  • Edited PDF form won't update for in browser editing.

    So I was sent a form that I had previously made editable that was changed and I had to add text boxes and check boxes. But after saving and opening in the browser window, the new fields I added aren't allowing me to type or check them in the browser,

  • Movieclip button keeps disappearing for some reason.

    I created our website using Actionscript 2.0 and on several of our pages there is a drop-down text box that has a "close" button on it, which is just a movieclip located inside the text box movieclip.  For some reason, if you stay on a page for a few

  • I have 2 iphone 4s on my account and they both now ring at the same time

    Mine and my son's iphones have become "linked." We both get the same calls at the same time, whenever he adds something to his phone, it shows up on mine as well. How can we "un-link" them?