Author Topic: Merge XMP metadata into file?  (Read 14006 times)

Offline drmrbrewer

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Merge XMP metadata into file?
« on: August 25, 2012, 08:49:07 AM »
I have some images with metadata in XMP sidecar files. Of course, PM handles this just fine, but if I wanted to do away with the sidecars by "flattening" the sidecars into the image files, allowing me to delete the sidecars, how might I go about it?

Slightly unrelated question: does the sidecar file have to be in the same folder as the image, or can a central sidecars folder be specified in PM?  Just thinking of sneaky ways of getting metadata out of a third party cataloging app and into the files (don't trust the cataloging app to write metadata into NEFs, whereas I trust PM entirely).

Thanks,

Mike
« Last Edit: August 27, 2012, 06:11:15 AM by drmrbrewer »

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Merge xml metadata into file?
« Reply #1 on: August 25, 2012, 09:47:23 AM »
Mike,

I have some images with metadata in xml sidecar files. Of course, PM handles this just fine, but if I wanted to do away with the sidecars by "flattening" the sidecars into the files, allowing me to delete the sidecars, how might I go about it?

Change your writing preferences to embed XMP as well as work with XMP sidecar files.  Change your reading preferences to read XMP first, embedded XMP second.  Then open one of the folders, select all of the images, and then apply an IPTC Stationery Pad that clears out some unused field.  PM will read your XMP sidecar files first and then when it does the update (writing) it will embed XMP metadata.  At this point you could delete the XMP sidecar files, but I'd suggest moving them somewhere else until you're convinced that you haven't lost anything.

Quote from: drmrbrewer
Slightly unrelated question: does the sidecar file have to be in the same folder as the image, or can a central sidecars folder be specified in PM?  Just thinking of sneaky ways of getting metadata out of a third party cataloging app and into the files (don't trust the cataloging app to write metadata into NEFs, whereas I trust PM entirely).

Yes, they must reside in the same folder as the images.

HTH,

-Kirk

Offline drmrbrewer

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Merge xml metadata into file?
« Reply #2 on: August 25, 2012, 02:20:10 PM »
Thanks, Kirk.  And there is no way of forcing PM to read metadata for a jpeg from an XMP sidecar file instead of from the file itself?

Mike

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Merge xml metadata into file?
« Reply #3 on: August 25, 2012, 03:37:41 PM »
Mike,

Thanks, Kirk.  And there is no way of forcing PM to read metadata for a jpeg from an XMP sidecar file instead of from the file itself?

No.  JPEGs are wonderful for embedding metadata in them so there is no need for .XMP sidecar files to be associated with them.

-Kirk

Offline drmrbrewer

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Merge xml metadata into file?
« Reply #4 on: August 26, 2012, 12:08:46 AM »
No need, except when trying to devise a consistent way (i.e. regardless of image type) to export all metadata from a third party catalog app (without touching the files) so as to be readable by PM.  It would seem quite consistent that one could stick an XMP file in a folder and have it apply to an image with the same base name, regardless of image type (indeed, the third party catalog app of which I speak has that behaviour).  Gives the user more options to get data in, and maybe there are users who would wish to use an XMP-only metadata scheme (whether jpeg or raw)... clearly you haven't seen a demand though :)

It would also be nice to have an explicit menu option to merge/import XMP data into the selected files, rather than have to do it by updating an unwanted field with preferences set in a particular way.

Mike

Offline Franz Dur

  • Newcomer
  • *
  • Posts: 45
    • View Profile
Re: Merge xml metadata into file?
« Reply #5 on: August 27, 2012, 05:42:43 AM »
One problem with JPG-linked XMP is that they will have the same name as the XMp for the raw: ABCD.NEF and ABCD.JPG will generate the sidecar ABCD.XMP. Which is messy.

Or then you'll have names like ABCD.NEF.XMP which is even more messy because some applications like Bibble/ASP generate this type of sidecars which really are no XMP but the ASP settings file for this image...

If one really wants an XMP file for a JPG it is easy to extract it with Exiftool.

But I agree with your first concern, getting away with the XMP, by writing them into the raw. Works like a charm with NEF, and with some restrictions with RW2 (Panasonic).

Francis

Offline drmrbrewer

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: Merge xml metadata into file?
« Reply #6 on: August 27, 2012, 06:24:32 AM »
One problem with JPG-linked XMP is that they will have the same name as the XMp for the raw: ABCD.NEF and ABCD.JPG will generate the sidecar ABCD.XMP. Which is messy.

Good point.  Personally I don't use RAW+JPEG, only RAW or JPEG.  For those that do have RAW and JPEG in the same folder, would they not want both the RAW and the JPEG to have the same metadata, i.e. so that a single XMP sidecar for both would actually be sensible?

I note, incidentally, that MS/PhaseOne Expression Media *does* seem to take account of the XMP in a JPEG+XMP combination.  Not that that is any reason for any other photo app to do the same, it's just an observation.  For me, it would be nice if PM did the same.

Mike

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Merge xml metadata into file?
« Reply #7 on: August 27, 2012, 06:35:08 AM »
Mike,

One problem with JPG-linked XMP is that they will have the same name as the XMp for the raw: ABCD.NEF and ABCD.JPG will generate the sidecar ABCD.XMP. Which is messy.

Good point.  Personally I don't use RAW+JPEG, only RAW or JPEG.  For those that do have RAW and JPEG in the same folder, would they not want both the RAW and the JPEG to have the same metadata, i.e. so that a single XMP sidecar for both would actually be sensible?

Photo Mechanic already handles this perfectly.  When you make a change to a RAW+JPEG pair, the same information is written into the JPEG itself and to the XMP sidecar file corresponding to the RAW file and optionally into the RAW file itself.  Both files will essentially have the same metadata.

Quote from: drmrbrewer
I note, incidentally, that MS/PhaseOne Expression Media *does* seem to take account of the XMP in a JPEG+XMP combination.  Not that that is any reason for any other photo app to do the same, it's just an observation.  For me, it would be nice if PM did the same.

It's not a direction we want to go in.  XMP sidecar files are for RAW files only.  The metadata standards are pretty clear on this.  If an XMP sidecar file exists in a folder without a matching RAW file, Photo Mechanic considers it an orphan file.

-Kirk