Bridge: Can't meta tag 6yr old files?

  • 1
  • Question
  • Updated 9 years ago
  • Answered
  • (Edited)
I am trying to meta-tag our archives and i have issues when tagging files that are over 5 or 6 years old. Bridge will not let me append metadata on PSDs or Tiffs. Occasionally it kicks back an error on jpegs too. These are files that have been sitting on a server for years, untouched. sometimes i have to open them, re-save them in CS5 and then append metadata. Why won't bridge write metadata to old files?
Photo of joshua withers

joshua withers

  • 89 Posts
  • 16 Reply Likes
  • frustrated

Posted 9 years ago

  • 1
Photo of Foster Brereton

Foster Brereton, Programmer

  • 43 Posts
  • 14 Reply Likes
Official Response
Hi Joshua,

I can hazard a guess: Bridge is trying to store the metadata in an XMP packet embedded in the file. Typically this XMP packet is saved with padding in the event metadata needs to be added. The padding gives Bridge the ability to expand the metadata without altering the rest of the file, assuring its validity. The problem with the older files is that they are either missing their XMP packet or the packet was saved without the extra padding. In either case Bridge would have to shuffle items around in the file to make room for the new metadata which it is reluctant to do for fear of corrupting the file.

By opening and re-saving the files in Photoshop CS5 the XMP packet is given the extra padding needed by Bridge to append the metadata. Once the padding is properly inserted, Bridge is able to modify the metadata while leaving the rest of the file's structure untouched.
Photo of PECourtejoie

PECourtejoie, Champion

  • 795 Posts
  • 288 Reply Likes
Foster, thanks for the useful explanation!
Could we know what version started to apply padded XMP?

Would it be possible to develop a script that would "sniff" the files, and update only the ones that are not compatible? (with the caveat that the dates of the files would change)
I think that this is the next logical step given your answer to Joshua's question.
Photo of Foster Brereton

Foster Brereton, Programmer

  • 43 Posts
  • 14 Reply Likes
I must admit I'm not that familiar with Photoshop's scripting interface; that being said the XMP packet is stored as one of the PSD image resources (id: 1060.)

As for JPEGs the XMP packet is stored under an APP1 marker and should be imported by Photoshop properly.

The XMP packet is an XML-based structure so if you can find it and grab it you should be able to identify how much the end of the structure is padded with empty space (if any). If memory serves the padding is the space character.

Were to you to ask for the packet from Photoshop (assuming you are able) I am not certain if you would get back the raw packet as found in the file (if any) or a packet constructed by Photoshop as a specific answer to your query.

I know that might not be exactly what you wanted to hear, but I hope it helps all the same!
Photo of Foster Brereton

Foster Brereton, Programmer

  • 43 Posts
  • 14 Reply Likes
As a followup the XMP specification is public and I do know of several utilities out there that will try to dive into files to find them. If you are unable to script a solution in Photoshop you may be able to write some kind of script or utility outside of Photoshop that leverages what is already available.
Photo of PECourtejoie

PECourtejoie, Champion

  • 795 Posts
  • 288 Reply Likes
Thanks, Foster... but I think that if we could know what version did not write files that are readily editable by Bridge, one could just sort the files, and then run a batch opening-saving. The reading of the internal XMP is maybe overkill.
Just knowing that files X years old need to be opened, then re-saved would be enough, and by Joshua's post the magic number seems to be 6 years.

Joshua, just to be sure, you are trying to tag the files locally, or over the network?