Skip to main content
Inspiring
October 1, 2009
Question

How to deal with metadata?

  • October 1, 2009
  • 1 reply
  • 2307 views

Hello,

I am writing a new format plugin and I would like to preserve the metadata as much as possible.My plugin works fine as is in terms of managing the image data but I can't figure out how to deal with metadata in a general way. I am new to the world of metadata so please forgive me if my question sounds trivial.

From the SDK doc, it is not clear to me how to push the metadata to Photoshop when I read a file (and in which format, through which interface) and how to get it back when the plugin needs to save a file. Could someone give me some pointer on how to do that?

Is Photoshop using the XMP standard (http://www.adobe.com/products/xmp/) ? If so, does it mean that I also need to get the SDK for XMP and use it to feed photoshop with metadata formatted with the XMP standard ?

Ideally, I would like to be able to manage metadata in a way that files loaded with my plugin can export their metadata to other formats once loaded in photoshop.

Thank you!

Gilbert

This topic has been closed for replies.

1 reply

Chris Cox
Legend
October 2, 2009

Yes, Photoshop uses XMP.

Yes, there are APIs to set and get XMP metadata when reading or writing a file.

G_SoucyAuthor
Inspiring
October 2, 2009

Thanks for the info.

I have a few more questions just to make sure that I am on the right track:

1- So, is it right to say that the data that I get from Photoshop (when saving a file in my plugin) from the handle

     gFormatRecord->imageRsrcData

is raw binary XMP data ?  If not, what is the data that I get from there and how do I get the XMP data?

2- Does the Photshop SDK api provide ways, by itself, to decode/encode XMP data  or should I download and install the SDK for XMP( http://www.adobe.com/devnet/xmp/ ) and deal with the binary data myself thougth the XMP api provided from the SDK?

Thanks again!

Gilbert

Chris Cox
Legend
October 3, 2009

No, as explained in the SDK - the image resource data is the Photoshop data, and contains many different things (mostly in binary form).

The Photoshop SDK does not include ways to compose or parse XMP data.  XMP is just an XML format, not binary.  Please read up on it.