XMP metadata lost in PNG files

Hello,
My XMP metadata is lost from a PNG file if the file is modified and saved. Here is what I am doing
1. Put some metadata in a PNG file using m_xmpFile.OpenFile( FileName, kXMP_PNGFile , kXMPFiles_OpenForUpdate)
2. Edit this file in Photoshop (changed the brightness and contrast of the file)
3. Saved the the modified files.
All my XMP metadata is now lost fromt the file.
is my implementation wrong? Is there some other way to stamp metadata in PNG files?
Thanks,
Hitesh

Info: Mac, Yosemite, Bridge CC
I have an extensive collection of PNG files that HAD been keyworded in Bridge (XMP). I noticed several days ago that the XMP of all those files is now missing.
When attempting to assign keywords back in, I also get the message: "The file ####.png canot store XMP metadata. No changes will occur." Weird. Like you said, it's looking like a bug.
And here's the kicker... if I duplicate the PNG file (Edit > Duplicate), the "copy" DOES contain the original XMP that went missing.
I really don't want to have to manually duplicate all my PNG files just to regain the metadata. Any brainy solution? I'm attaching an example of the original PNG (missing XMP) and the duplicated PNG (magically restored XMP).

Similar Messages

  • XMP metadata lost from PNG files after saveing

    Hello,
    i am using Photosop CS3 SDK. through my plug-in I put some metadata in the file using XMP SDK 4.4.2.
    For PNG files, if the file is modified and saved, all the XMP metadata is lost from the file.
    The following steps are being done.
    1. Put some metadata in PNG file using SXMPMeta::SetProperty and SXMPMeta::AppendArrayItem
    2. modify the file (changed brightness, contrast, flattened the image).
    3. Save this file.
    After saving all the xmp metadata is lost from the PNG file. This works for all other formats.
    What can be wrong that I am doing?
    Is there any other way to put XMP metadata in file?
    Thanks,
    Hitesh

    That's probably because PNG doesn't save or read XMP metadata.
    There really aren't standards for metadata in PNG. (though a few products have tried adding it in ad-hoc ways, without documenting their efforts)

  • 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();

  • 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?

  • Embedding extended XMP metadata into a PDF file

    Hello.
    I am preparing a thesis for submission into our library repository. They keep some additional information about the paper in a separate XML file which looks like: http://naca.central.cranfield.ac.uk/ethos-oai/2.0/uketd.xml
    The metadata can be then easily harvested by other libraries etc.
    Because the papers are downloadable and can freely circulate over the Internet I would like to also include the metadata into the PDF itself.
    I've managed to extend the PDFX (MiKTeX) package such that it writes custom metadata in addition to the default fields (Author, Title, Subject, Keywords) into the PDF.
    The problem is that the library metadata (see above) makes use of XSI schema which is apparently not compatible with RDF format of XMP.
    Is there a way to get such rich metadata sets into a PDF file in a portable and accessible (thinking about search engines) way or should I stick with plain Simple Dublin Core?
    Thanks for recommendations.

    You may want to repost this in the XMP SDK forum:  http://forums.adobe.com/community/design_development/xmp_sdk

  • Option to store xmp metadata outside of DNG file

    This would serve to improve differential backups, as the xmp file format is text based and easy to tell differences.

    Walt,
    No, you totally misunderstood what I meant. I'm not talking about LR catalog backups, I'm talking about backing up scores of dng files completely outside of LR, from the OS or some other external tool. With my suggestion, the xmp file would be right next to its dng file, and i would be backing up the whole directory hierarchy that hold my files. One of the benefits of LR over Aperture is that I can access, manipulate, and/or backup my files outside of the app rather than having them locked up in a vault which must be backed up in one huge blob.
    If I change the brightness of 500 dng files using LR, then back up all my dng files using rsync (for example), I will be copying 500 large binary files around. If my edits were saved in separate text files (xmp), then my backup program could only copy the DIFF of each of the text files (one line added to each file, so one line, or five in a normal unified diff format, is all that needs copied around). This would be exponentially faster.
    Embedded xmp edits is not a good practice, from an OS-level backup point of view. Since not everyone will agree on that, I'm asking for a checkbox option - I'm fine with it being embedded by default.
    With xmp data being stored inside the dng file, and LR changing the dng file every time I edit something, LR is hardly non-destructive from an OS-level point of view when dng files are used.
    No where in the spec does it state that xmp changes data MUST be stored in the dng file. I'm simply asking for the option to store that data outside of the DNG file, so that the dng file only needs backed up once or rarely, rather than every time I make an edit.

  • Where do the XMP metadata templates and keywords files go WIN XP?

    I've just changed computers and upgraded to CS6. I am trying to import my Bridge metadata templates and keywords. I have the files from the old computer but I don't know where to put them on the new computer. The same folder structure where I found them (documents and settings/username/AppData/Adobe/BridgeCS5) does not exist on my new computer after installation of CS6. I tried pasting them in the program files folder for CS6, but this didn't work. I am using Windows XP. Thanks in advance.

    I tried pasting them in the program files folder for CS6, but this didn't work.
    Not familiair with Windows but on a Mac the path you show is still the same. Did you already used Bridge once?
    Quickest way I can think of is putting the files on your desktop and from Bridge metadata and keyword panel use the little menu icon top right of the panel and choose import settings. Find and select both settings and you should be OK.
    Also check this blog out, especially if you have subscribed to the cloud:
    http://blogs.adobe.com/jnack/2012/09/photoshop-windows-xp-end-of-the-line.html

  • Editing XMP metadata in Bridge for checked-out files?

    Our custom connector does not implement the WRITE_XMP_METADATA Capability because we do not want to change the XMP of a file in our DAM system without checking in a new file version.
    However, when a file is checked out through Adobe Drive, we would expect to be able to edit its XMP metadata in Bridge just like we can for local files.
    It looks like this is still not possible with Adobe Drive 3, i.e. if your connector does not implement the WRITE_XMP_METADATA Capability you cannot edit XMP for checked out files either.
    It seems weird that you can edit XMP metadata for checked out files with regular CS applications but not with Bridge. Is this something that is expected to be fixed in a future version?
    Thanks

    In our design, editing XMP data in Bridge and in regular CS applications is different, the former one will be routed to SetXMPHandler in you connector, in the latter case, CS applications take the normal file writting ways to embed XMP data in the file content.
    The purpose of this design is to offer similar user experience for normal users when they edit XMP data for AD assets and local file assets, they don't need to check-out files first.
    To address your issue, I think you can add some codes in SetXMPHandler to auto check-out files before real XMP operation, and check-in them before exiting the handler
    We will consider to make some enhancements for this part, that's, to allow editng XMP data for the checked-out files in Br, in the next release, thanks for this advice.

  • 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.

  • XMP metadata is lost while updating XMP using Exempi on linux

    Hello, I'm using the library XMPFiles for Linux (Exempi) to update XMP metadata of a tiff file. As a result RichTiffIPTC Tag is being removed and Photoshop tag was changed (2 photoshop image resources are also being removed : IPTC metadata (ID=1028) and MD5 digest of the IPTC (ID=1061)).
    I've checked the library sources and found the following code :
    #if XMP_UNIXBuild
    // ! Hack until the legacy-as-local issues are resolved for generic UNIX.
            iptc = 0;    // Strip IIM from the file.
            if ( tiff != 0 ) tiff->DeleteTag ( kTIFF_PrimaryIFD, kTIFF_IPTC );
            if ( psir != 0 ) {
                psir->DeleteImgRsrc ( kPSIR_IPTC );
                psir->DeleteImgRsrc ( kPSIR_IPTCDigest );
    #endif 
    Can anyone please explain the reason of such behavior?
      TIA,
    Slava

    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?

  • XMP Stamping fails on PNG in photoshop

    Hi,
    I am using Photoshop CS3 sdk for developing a plugin. I am supposed to add some metadata information in the PNG file. I do it using xmp sdk.
    I can add information in the png file using xmp sdk.
    But when i open the same PNG file in photoshop and save it with some modifications then photoshop wipes out the xmp information in the PNG file. So i am losing my metadata if user tries to modify the file in photoshop.
    Can anybody help me in this regard.
    Note : XMP stamping works fine for other image formats like JPEG, PSD.
    Thanks in advance.

    ohh....
    Is ther any workaround to do the same. ??

  • Problem with Bridge CS4 reading/editing XMP metadata added in Bridge CS6

    Please excuse me if this is a dumb/obvious question. I did try searching the forums for similar problems and didn't find anything that seemed to speak to my issue.
    I'm having a problem where Bridge CS4 won't read/edit xmp metadata (specifically, keywords and descriptions in the IPTC panel) that I have entered using CS6. it will read some files, not others. The files are all .mp4s. Of these files, I can read/edit IPTC panel metadata for some of them in Bridge CS4; I can add metadata for all of them in CS6. I see no particular pattern in these files to explain what is and isn't read/editable in CS4.
    My question is whether this is a compatibility issue between different versions of CS (in this instance, CS4 and CS6). i know it's a tired refrain to blame software when it could easily be user error, in which case I'd be frankly delighted to know what i'm doing wrong. Please bear with me as I give a few more details.
    I'm using macs. I've tried this on multiple systems - for instance, on a mac pro 3 which for some reason has both CS4 and CS6 installed, i can add and edit keywords using CS6, but not when using CS4. Again, in CS4, some .mp4 files read/edit, others do not.
    Bridge CS4 blames the files and tells me that the selected file cannot store xmp metadata, and that the properties cannot be modified. To be specific, in the metadata panel it says "this property cannot be modified"; in the keyword panel, it says, "This file (zzz.mp4) cannot store xmp metadata. No changes will occur." This seems odd, because I'm able to add xmp metadata for the same files in CS6 on the same computer, and other computers. I know this problem would disappear if all our computers were using CS6 (or CC), but unfortunately that's not a possibility at the moment. Some of them only have CS4.
    Computer details (not an exhaustive list, but two instances): mac pro 3.1 running snow leopard, 16GB memory; macbook pro 4.1 running snow leopard, 4GB memory; adobe bridge cs6 (5.0.0.399) and cs4 (3.0.0.464).
    Things I have tried:
    Permissions - the files are set to read/write for everyone. Given that I can add/edit metadata in CS6, it doesn't seem to be a permission issue.
    Purging the cache - other users seem to have had problems adding metadata in Bridge CS4 where purging the cache for affected files solved the problem. Didn't work in this instance.
    Upgrading all affected computers to CS6/CC is beyond my control. I need to figure out why CS4 won't let me read/add/edit xmp metadata, if only for the sake of understanding the broader implications for interoperability.
    Any helpful suggestions would be much appreciated.
    Thanks,
    Kevin

    adobe bridge cs6 (5.0.0.399) and cs4 (3.0.0.464).
    Without having experience with mp4 files and metadata my observation is that you certainly have not updated Bridge CS6 ( should be 5.0.2.4) and I believe also not the latest version of CS4, can't imaging this also stayed at .0.0 so first try to update both.
    And if CS4 can read the data of some files it should be capable of reading them all. Be sure to have the files completely cached first, can take a while.
    Other things to try in CS4 is refresh preferences (hold down option key while restarting Bridge and choose reset prefs).
    And also check for hidden cache files using menu view/show hidden files. Sometimes those cache files can be troublesome between versions.
    If purge cache did not work and reset prefs also failed consider to also delete Bridge plist file and Bridge cache file manual (from user library)

  • [CS3 JS] How to force XMP metadata update for a thumbnail?

    Hi Folks,
    In a JavaScript in Bridge CS3, I'm updating a value in the XMP metadata for a Thumbnail. Later in the script I want to read the updated XMP metadata information from the Thumbnail, but often Bridge hasn't updated the metadata by the time I read it. In other words, my script reads the value prior to the update. I'm guessing there's a caching issue going on.
    I'm new to Bridge scripting, and I am hoping someone here can offer suggestions on how I can (or, even *if* I can) force Bridge to update the XMP metadata cache for a file so that when I read it later in the script it will reflect the recent changes. I've tried using Thumbnail.refresh(), but that doesn't seem to do the trick. I don't mind a slower script, I just want to be able to read the correct value.
    Thanks in advance for any help!
    -- Jim

    Hi David,
    I'm running this script on a MacBook Pro, 2.5GHz, 4GB RAM.
    Here is a sample JSX that shows the issue I'm having:
    #target "bridge-2.0"
    main();
    function main() {
        if( xmpLib == undefined ) {
            var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";
            var libfile = new File( pathToLib );
            var xmpLib = new ExternalObject("lib:" + pathToLib );
        var myValue = "Headline Test";
        var myFilePath = "~/Desktop/TestFile.tif";
        var curHeadlineStr = XMPGetHeadline(myFilePath);
        $.writeln("Headline value: \"" +  curHeadlineStr + "\"");
        XMPWriteHeadline(myFilePath, myValue);
        // *** I would like to refresh the cache here ***
        curHeadlineStr = XMPGetHeadline(myFilePath);
        $.writeln("Headline value: \"" +  curHeadlineStr + "\"");
    function XMPGetHeadline(theFilePath) {
        var thumb = new Thumbnail(File (theFilePath) );
        md = thumb.synchronousMetadata;   
        xmp = new XMPMeta(md.serialize());
        var myHeadlineXMPProp = xmp.getProperty
            (XMPConst.NS_PHOTOSHOP, "Headline", XMPConst.STRING);
        return myHeadlineXMPProp;
    function XMPWriteHeadline(theFilePath, theTextStr){
        var thumb = new Thumbnail(File (theFilePath) );
        md = thumb.synchronousMetadata;   
        xmp = new XMPMeta(md.serialize());
        var myOrigHeadlineXMPProp = xmp.getProperty
            (XMPConst.NS_PHOTOSHOP, "Headline", XMPConst.STRING);
        xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "Headline");
        xmp.setProperty(XMPConst.NS_PHOTOSHOP, "Headline", theTextStr, 0, XMPConst.STRING);
        var updatedPacket = xmp.serialize
            (XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
        thumb.metadata = new Metadata(updatedPacket);
    To run this script, in main(), set the myFilePath variable to the path of a file that has an "IPTC Code" "Headline" property.
    This script, when run, sets the "Headline" property value to the value of myValue. After runing the script for the first time, take a look at the console log. You should see that Headline value displayed does not change between the two console entries. My log looks like this after the first run:
      Headline value: "undefined"
      Headline value: "undefined"
    The thing is, the second entry in the console listing, above, was created after the Headline value was set by XMPWriteHeadline(). The two values should be different between the two console entries.
    If you run the script a second time against the same file, you will see that the Headline value does contain the value that was written in the first run of the script--it just took some time to update the cache, I'm guessing. Here's the second run's log:
      Headline value: "Headline Test"
       Headline value: "Headline Test"
    So, what I'm looking for is a way to insert code (where the comment line "//*** I would like to refresh the cache here ***" appears), to force Bridge CS3 to refresh its cache so that when I call XMPGetHeadline() after calling XMPWriteHeadline(), the Headline value will return the value that was just written.
    I hope this is clear enough...
    Thanks!!!!
    -- Jim

  • Batching TIF to PNG - metadata lost

    For many years now (since the days of PS7) I have used some carefully crafted actions to prepare entire directories of up to 1,000 images for publishing to the Internet.  Or it may be that I am running a series of tonal adjusting commands and saving the images into another directory as "enhanced" images.
    Here is my problem.  I have metadata templates for each record set that I apply to a record set.  I then enter new keywords for each image in the set.  Afterwards I would create my enhanced set of images.  No harm, no foul for the exception of two fields becoming truncated after the file is saved.  And that is easy enough to repair be selecting the record set of images and making the minor repair.
    Here lies the problem.  After processing to achieve the enhanced set of images I run another set of actions resulting in a smaller dimensional file with a drop shadow suitable for uploading to an Interent Content Managament System.  No problem.  Except that the metadata information has been stripped.  At present I have to reapply the metadata template and then copy each set of keywords from the original files into the PNG files.  This is very time consuming and can take up to 8 or more hours to copy the keywords over.
    And yes, I despise Fireworks (it should be called some four letter words) and it bloats the files' size by up to 10% per image.  When you are talking about 1,000 plus images per batch 10% per image file size bloat starts adding up!  I see no way in Firepuke to run a batch, unless that is the Script command and even then I am not a programmer and don't have the time to teach myself programming.
    Furtermore, I don't want to have to create a set of actions for Photoshop and then open another program (Firepuke) to run a series of actions to prepare the same file for the Internet.
    Any thoughts, and especially any help, would be deeply appreciated
    A. Wayne Webb

    Info: Mac, Yosemite, Bridge CC
    I have an extensive collection of PNG files that HAD been keyworded in Bridge (XMP). I noticed several days ago that the XMP of all those files is now missing.
    When attempting to assign keywords back in, I also get the message: "The file ####.png canot store XMP metadata. No changes will occur." Weird. Like you said, it's looking like a bug.
    And here's the kicker... if I duplicate the PNG file (Edit > Duplicate), the "copy" DOES contain the original XMP that went missing.
    I really don't want to have to manually duplicate all my PNG files just to regain the metadata. Any brainy solution? I'm attaching an example of the original PNG (missing XMP) and the duplicated PNG (magically restored XMP).

  • IPTC Core metadata fields lost with PNGs

    Hi there,
    I have a TIF file which contains data in the IPTC core fields. Converting the TIF to a JPEG will retain most of the fields and can be viewed still in Adobe Bridge.
    However, converting to a PNG will lose all of the data. The only way it seems to retain metadata is to set options on the Save to Web options in Photoshop, which doesn't really work too good with a 100mb TIF being converted.
    Resampling to PNG in ImageMagick and then reading in Bridge has the same issue, even though 8BIN and IPTC profiles are actually embedded into the file.
    Does Bridge support IPTC core metadata for PNG files?
    Many thanks!

    They've confirmed the same thing i've found, that Save For Web actually preserves a chunk of the IPTC core data, but this isn't really any good for the quality of image I need to save.
    It's strange how the XMP preserve option isn't available for a standard PNG save.

Maybe you are looking for

  • How do you see the size of your library now in iTunes 11?

    On iTunes 10 when you were looking at your song list, at the bottom everyone has seen the small informative text that tells you how many days it would take to listen to the songs that you currently have on the screen. Where is that information now??

  • Zen Vision M track t

    I have the latest firmware installed on my 30 Gb Vision M player. Even though I have verified that all my music has the proper track ID tags on my PC, they do not show up properly on the M. They are usually displayed as Track 0 on the Zen, but for so

  • 802.1x Configuration

    Hi all >I want to deploy 802.1x on my network. 1- Switches 3560 series with IOS 12.2(35)SE1 2- ACS 4.1 3- Windows Vista for Clients >My questions are: 1- Is 802.1x support windows vista 2- How the client will be authenticated. Is there any software w

  • How to fix audible files that won't sync

    Apple repaired my computer. New motherboard and all. Now my iPhone 4s won't sync certain files. iTunes help is horrid and they don't have a phone number. Anyone know how to fix this issue shown below. We're on our own iTunes isn't going to help. And

  • Loss of video performance when upgrading to Snow Leopard?

    Hello all! I apologize in advance if this topic has already been addressed, but I could not find it in the threads, or online anywhere. I recently upgraded from Tiger to Snow Leopard using the Apple Pack that comes with iLife and iWork and noticed a