Project

General

Profile

Support of XMP metadata in PNG files

Added by Cedric Bonnier almost 8 years ago

Hi there,
I've got issues with Photoshop and Exiv2 XMP metadata inside PNG images, it seems to not work properly. It is working in JPEG images though, with the exact same code. Exiftool doesn't seem to pick up Photoshop's XMP metadata either.

Is there something special to do for PNG files that is not needed for JPEG? Did Adobe add some non standard thing on top of their own standard for Photoshop CS5/6 (I haven't tried with Photoshop CC yet but I bet it will be the same)?

I described more in details what I was doing in a post on stackoverflow but didn't get much help there.

Steps to reproduce: Open Photoshop, create an image, save it as PNG, close the document, reopen it, open the file info dialog (Ctrl+Alt+Shift+I) and see that there are XMP properties (like xmp:CreateDate, xmp:CreatorTool, etc). Now try opening the image with Exiv2 (I used 0.23 and 0.24) and you don't see any properties. Same for Exiftool. Now if using Exiv2 you try adding XMP properties, save them, open the image back in Photoshop, the properties are not in the file info dialog. If you modify and save the image in Photoshop those added properties will be removed (the image seems to not contain any XMP metadata just like before adding those properties).

Now if you do the same thing with a JPEG image, everything works as expected...

Thanks in advance for any help


Replies (2)

RE: Support of XMP metadata in PNG files - Added by Cedric Bonnier almost 8 years ago

I was able to use Photoshop CC and everything works fine with it. It must have been a bug in Photoshop CS5 and CS6 that has been corrected in CC.

RE: Support of XMP metadata in PNG files - Added by Phil Harvey over 7 years ago

It only took Adobe 5 years to fix this problem. I reported it to them in 2008.

Contrary to their own XMP specification, Adobe had been storing the XMP in the resource fork of the file (on a Mac anyway). With ExifTool, you need to add the -ee option to extract information from the resource fork. But if you do this, you should be able to see this XMP with ExifTool. (Assuming you are on a Mac. I don't know how the pre-CC Windows versions store XMP.)

    (1-2/2)