• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Scripting IPTC metadata in PS CS3

New Here ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

Has anyone else noticed the following problems when using scripts to manipulate IPTC metadata in Photoshop CS3? Found a way around them?

--There appears to be no way to access the following fields in a script:
IPTC Contact: E-Mail(s)
IPTC Contact: Website(s)
IPTC Image, Origin: Date Created (N.B. This does not correspond to DocumentInfo.creationDate, for some reason.)
IPTC Image: Location
IPTC Status: Rights Usage Terms

--Whenever I use a script to manipulate the metadata of ANY field (e.g. title, headline, keywords, etc.), any content in the fields listed above is deleted.

Anyone working on a solution? (That means you, Adobe.)

Thanks,
Andrew Slayman
TOPICS
Actions and scripting

Views

682

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Valorous Hero ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

You could always access this data from Bridge or Photoshop via BridgeTalk.

var myEmail = md.read("http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:CiEmailWork");
var myURL = md.read("http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:CiUrlWork");

Etc..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

Paul R.,

Many thanks for the suggestion. Never used BridgeTalk, so that will take some figuring out.

But the situation turns out to be more complicated than I thought. Basically, whenever I run a Photoshop action on a batch of PSD images selected in Bridge, it blitzes the five fields listed above. The action needn't have anything to do with metadata, and as far as I can tell the problem affects only PSDs. (DNGs and TIFFs are certainly okay.) So even if I can figure out how to use BridgeTalk, there may be no data for BridgeTalk to retrieve.

Any idea how one files a bug report around here?

Andrew

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 14, 2008 Jul 14, 2008

Copy link to clipboard

Copied

LATEST
Another way of getting the data direct from Photoshop would be to use one of Xbytors functions...

#target photoshop
function parseMetadata(xmp, tag) {
var re = new RegExp('<' + tag + '>(.+)</' + tag + '>');
var m = xmp.match(re);
if (!m) {
re = new RegExp("<[^:]+:" + tag + ">(.+)</[^:]+:" + tag + '>');
m = this.xmp.match(re);
}

return (m ? m[1] : '');
};

var xmp = activeDocument.xmpMetadata.rawData;
alert(parseMetadata(xmp,"Iptc4xmpCore:CiEmailWork"));

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines