Copy link to clipboard
Copied
I'd like to use Photoshop, and scripting, to modify several IPTC fields in a JPEG, without actually opening the JPEG, and then also rename the JPEG.
Right now, I've got a .JSX script I wrote that will do the following:
1) Ask the user to point to a directory containing JPEG files
2) Ask the user to input a caption
3) Open each JPEG in the directory, modify the Author, Caption, and several other fields
4) Save-As the JPEG to a new directory, with a different name
5) Close the JPEG
This JSX works great right now. But if there are 100 images, then it take a long time to complete this task.
I have another .JSX script that will complete some of this work without opening the JPEG in Photoshop. But this .JSX script only modifies XMP data. That information is not visible from the Windows file system when I right-click and ask for "details."
How can I write a .JSX script to modify the IPTC metadata without actually opening the JPG, and how can I get Photoshop to rename the file as well?
Thanks,
Copy link to clipboard
Copied
Photoshop can not rename files but you can use Javascript file system support to rename files. For Photoshop to change IPTC metadata not only would it need to open the files it would also need to write the file. The Bridge can read and write metadata without opening the document in Photoshop and Bridge can rename files. Bridge can be scripted but I have never written a Bridge script and there is some kind a Bridge Talk interface between Bridge scripts and Photoshop scripts. You may want to look at Bridge scripting.
Copy link to clipboard
Copied
In the last couple of hours, I've written a script that allows Photoshop to modify IPTC information without opening the JPG, and also allows it to rename the JPG without opening or re-saving it.
What I'm missing now is an understanding of how to identify all the metadata that it's possible to change, and how to do that. I can change author and description and copyright notice. But I want to modify more.
How can I insert my code here to share, and not have it look like a mess?
Copy link to clipboard
Copied
It would help if you mentioned what fields you want to deal with, as not all fields require the same code.
Copy link to clipboard
Copied
Right now I can modify "description" "title" "rights" and "creator":
xmp.deleteProperty(XMPConst.NS_DC, "description");
xmp.setLocalizedText(XMPConst.NS_DC, "description", null, "x-default", TheCaption);
xmp.deleteProperty(XMPConst.NS_DC, "title");
xmp.setLocalizedText(XMPConst.NS_DC, "title", null, "x-default", TheCaption);
xmp.deleteProperty(XMPConst.NS_DC, "rights");
xmp.setLocalizedText(XMPConst.NS_DC, "rights", null, "x-default", TheCopyrightNoticeMessage);
xmp.deleteProperty(XMPConst.NS_DC, "creator");
xmp.appendArrayItem(XMPConst.NS_DC, "creator", ThePhotographer, 0, XMPConst.ARRAY_IS_ORDERED);
After this, I modify the JPG:
if (xmpf.canPutXMP( xmp ))
{
xmpf.putXMP( xmp );
}
xmpf.closeFile( XMPConst.CLOSE_UPDATE_SAFELY );
This is all accomplished without Photoshop having to open the JPG.
I'd like to modify "description writer" "copyright status" "copyright info URL", "Websites(s)" in the IPTC tab, and possibly "date created", "City" "State" and "Country" in the IPTC tab.
Some of these fields are visible from within the Windows file system, when you right-click on a JPG and look at the "details" tab. Others are only visible inside Photoshop under the file info menu option.
Thanks.
Copy link to clipboard
Copied
Hope these help...
xmp.appendArrayItem( XMPConst.NS_DC, "creator", "Creator", 0, XMPConst.ARRAY_IS_ORDERED );
xmp.setLocalizedText( XMPConst.NS_DC, "title", null, "en-US", "Title" );
xmp.setProperty(XMPConst.NS_PHOTOSHOP, "AuthorsPosition", "Author Position");
xmp.setProperty(XMPConst.NS_PHOTOSHOP, "Headline", "Headline");
xmp.setLocalizedText( XMPConst.NS_DC, "description", null, "x-default", "Caption/Description" );
xmp.setProperty(XMPConst.NS_PHOTOSHOP, "DateCreated", new XMPDateTime(new Date()), XMPConst.XMPDATE);
var Keys=["Keyword1","Keyword2","Etc."];
for(var s in Keys){
xmp.appendArrayItem(XMPConst.NS_DC, "subject", Keys
, 0,XMPConst.PROP_IS_ARRAY);}
xmp.setStructField( XMPConst.NS_IPTC_CORE, "CreatorContactInfo", XMPConst.NS_IPTC_CORE, "CiAdrCtry", "England" );
xmp.setStructField( XMPConst.NS_IPTC_CORE, "CreatorContactInfo", XMPConst.NS_IPTC_CORE, "CiEmailWork", "Joe.Bloggs@email.com" );
xmp.setStructField( XMPConst.NS_IPTC_CORE, "CreatorContactInfo", XMPConst.NS_IPTC_CORE, "CiAdrCity","Leeds");
xmp.setStructField( XMPConst.NS_IPTC_CORE, "CreatorContactInfo", XMPConst.NS_IPTC_CORE, "CiAdrExtadr","Address");
xmp.setStructField( XMPConst.NS_IPTC_CORE, "CreatorContactInfo", XMPConst.NS_IPTC_CORE, "CiAdrPcode","LS12PP");
xmp.setStructField( XMPConst.NS_IPTC_CORE, "CreatorContactInfo", XMPConst.NS_IPTC_CORE, "CiAdrRegion","West Yorkshire");
xmp.setStructField( XMPConst.NS_IPTC_CORE, "CreatorContactInfo", XMPConst.NS_IPTC_CORE, "CiTelWork","0132999999");
xmp.setStructField( XMPConst.NS_IPTC_CORE, "CreatorContactInfo", XMPConst.NS_IPTC_CORE, "CiUrlWork","www.mysite.co.uk");
xmp.setProperty( XMPConst.NS_IPTC_CORE, "Iptc4xmpCore:Location","Sub Location");
xmp.setProperty( XMPConst.NS_IPTC_CORE, "Iptc4xmpCore:IntellectualGenre","Itellectual Genre");
xmp.appendArrayItem( XMPConst.NS_IPTC_CORE, "Iptc4xmpCore:SubjectCode","IPTC Subject Code",0,XMPConst.PROP_IS_ARRAY);
xmp.appendArrayItem( XMPConst.NS_IPTC_CORE, "Iptc4xmpCore:Scene","IPTC Scene Code",0,XMPConst.PROP_IS_ARRAY);
xmp.setProperty( XMPConst.NS_IPTC_CORE, "Iptc4xmpCore:CountryCode", "ISO Country Code" );
xmp.setProperty(XMPConst.NS_PHOTOSHOP, "City", "London");
xmp.setProperty(XMPConst.NS_PHOTOSHOP, "State", "State/Province");
xmp.setProperty(XMPConst.NS_PHOTOSHOP, "Country", "Britain");
xmp.setProperty(XMPConst.NS_PHOTOSHOP, "CaptionWriter", "Description Writer");
xmp.setProperty(XMPConst.NS_PHOTOSHOP, "TransmissionReference", "Job Identifier");
xmp.setProperty(XMPConst.NS_PHOTOSHOP, "Instructions", "Instructions");
xmp.setProperty(XMPConst.NS_PHOTOSHOP, "Credit", "Credit Line");
xmp.setProperty(XMPConst.NS_PHOTOSHOP, "Source", "Source");
xmp.setLocalizedText( XMPConst.NS_DC, "rights", null, "x-default", "Copyright Notice" );
xmp.appendArrayItem( XMPConst.NS_XMP_RIGHTS, "UsageTerms","Rights Usage",0,XMPConst.PROP_IS_ARRAY);
Copy link to clipboard
Copied
Thanks. I'll give that a shot. Also, I think I'll try to insert my code in here using "advanced editor" and "insert raw HTML."
//
//
// Right now, this is saved in a .jsx file on my desktop.
// If I click it, it opens Photoshop, and
// I am prompted to select a directory of images.
// Then I am asked to enter a caption, and then my name.
// Then Photoshop inserts that information into each JPG
// and also renames the JPGs image_1.jpg, image_2.jpg, image_3.jpg, etc.,
// all without opening any images.
// I want to know how to modify even more IPTC or metadata
// than what I am modifying now. Right now I modify four fields.
// It's hard to guess what needs to be done to modify other fields.
//
var picFolder = Folder.selectDialog("Select a folder to process");
TheCaption = Window.prompt ("Enter a caption for the photos.");
ThePhotographer = Window.prompt ("What's the photographer's name?.");
TheCopyrightNoticeMessage = "This image is copyrighted";
var i = 0;
var pics = Folder(picFolder).getFiles("*.JPG");
if ( !ExternalObject.AdobeXMPScript ) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
for (f in pics)
{
file = pics;
var xmpf = new XMPFile( File(file).fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE );
var xmp = xmpf.getXMP();xmp.deleteProperty(XMPConst.NS_DC, "description");
xmp.setLocalizedText(XMPConst.NS_DC, "description", null, "x-default", TheCaption);
xmp.deleteProperty(XMPConst.NS_DC, "title");
xmp.setLocalizedText(XMPConst.NS_DC, "title", null, "x-default", TheCaption);
xmp.deleteProperty(XMPConst.NS_DC, "rights");
xmp.setLocalizedText(XMPConst.NS_DC, "rights", null, "x-default", TheCopyrightNoticeMessage);
xmp.deleteProperty(XMPConst.NS_DC, "creator");
xmp.appendArrayItem(XMPConst.NS_DC, "creator", ThePhotographer, 0, XMPConst.ARRAY_IS_ORDERED);if (xmpf.canPutXMP( xmp ))
{
xmpf.putXMP( xmp );
}
xmpf.closeFile( XMPConst.CLOSE_UPDATE_SAFELY );
i = i + 1;
file.rename("image_" + i + ".jpg");
}//
Copy link to clipboard
Copied
To insert code on this forum, goto advanced editor, click >> and select javascript.
The raw html didn't work out as it should
Copy link to clipboard
Copied
//
// Right now, this is saved in a .jsx file on my desktop.
// If I click it, it opens Photoshop, and
// I am prompted to select a directory of images.
// Then I am asked to enter a caption, and then my name.
// Then Photoshop inserts that information into each JPG
// and also renames the JPGs image_1.jpg, image_2.jpg, image_3.jpg, etc.,
// all without opening any images.
// I want to know how to modify even more IPTC or metadata
// than what I am modifying now. Right now I modify four fields.
// It's hard to guess what needs to be done to modify other fields.
//
var picFolder = Folder.selectDialog("Select a folder to process");
TheCaption = Window.prompt ("Enter a caption for the photos.");
ThePhotographer = Window.prompt ("What's the photographer's name?.");
TheCopyrightNoticeMessage = "This image is copyrighted";
var i = 0;
var pics = Folder(picFolder).getFiles("*.JPG");
if ( !ExternalObject.AdobeXMPScript ) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
for (f in pics)
{
file = pics;
var xmpf = new XMPFile( File(file).fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE );
var xmp = xmpf.getXMP();xmp.deleteProperty(XMPConst.NS_DC, "description");
xmp.setLocalizedText(XMPConst.NS_DC, "description", null, "x-default", TheCaption);
xmp.deleteProperty(XMPConst.NS_DC, "title");
xmp.setLocalizedText(XMPConst.NS_DC, "title", null, "x-default", TheCaption);
xmp.deleteProperty(XMPConst.NS_DC, "rights");
xmp.setLocalizedText(XMPConst.NS_DC, "rights", null, "x-default", TheCopyrightNoticeMessage);
xmp.deleteProperty(XMPConst.NS_DC, "creator");
xmp.appendArrayItem(XMPConst.NS_DC, "creator", ThePhotographer, 0, XMPConst.ARRAY_IS_ORDERED);if (xmpf.canPutXMP( xmp ))
{
xmpf.putXMP( xmp );
}
xmpf.closeFile( XMPConst.CLOSE_UPDATE_SAFELY );
i = i + 1;
file.rename("image_" + i + ".jpg");
}
Copy link to clipboard
Copied
SuperMerlin​, maybe you have the values for IPTC Extension?
Copy link to clipboard
Copied
To be honest no, but I do have a work-a-round that works for me.
Here is a Photoshop script that could easiliy be changed for Bridge.
/*
Example on how to populate ArtworkOrObject , locationShown and locationCreated fields
*/
#target photoshop;
app.bringToFront();
if(documents.length){
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
xmp = new XMPMeta( app.activeDocument.xmpMetadata.rawData );
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/","ImageSupplierImageID", activeDocument.name);
newxmp = new XMPMeta(ArtworkOrObject("1944-12-20T00:00Z","Source field","Copyright field","Title field","Your name","123456789"));
XMPUtils.appendProperties(newxmp, xmp, XMPConst.APPEND_ALL_PROPERTIES);
newxmp = new XMPMeta(locationShown("Daisy Hill","Bradford","W. Yks","England","+44","In the stars"));
XMPUtils.appendProperties(newxmp, xmp, XMPConst.APPEND_ALL_PROPERTIES);
newxmp = new XMPMeta(locationCreated("Denby Dale","York","W. Yks","England","+44","Out There"));
XMPUtils.appendProperties(newxmp, xmp, XMPConst.APPEND_ALL_PROPERTIES);
app.activeDocument.xmpMetadata.rawData = xmp.serialize();
};
function ArtworkOrObject(date,Source,Copy,Title,Creator,SInvNo){
if(date == undefined) date = ''; if(Source == undefined) Source = '';
if(Copy == undefined) Copy = ''; if(Title == undefined) Title ='';
if(Creator == undefined) Creator = ''; if(SInvNo == undefined) SInvNo = '';
var s ="<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27 \">";
s+="<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">";
s+="<rdf:Description rdf:about=\"\" xmlns:Iptc4xmpExt=\"http://iptc.org/std/Iptc4xmpExt/2008-02-29/\">"
s+="<Iptc4xmpExt:ArtworkOrObject><rdf:Bag><rdf:li><rdf:Description ";
s+=" Iptc4xmpExt:AODateCreated=\"" + date + "\" Iptc4xmpExt:AOSource=\"" +Source + "\" ";
s+=" Iptc4xmpExt:AOSourceInvNo=\""+SInvNo + "\" Iptc4xmpExt:AOCopyrightNotice=\"" + Copy +"\">";
s+="<Iptc4xmpExt:AOTitle><rdf:Alt><rdf:li xml:lang=\"x-default\">" + Title;
s+=" </rdf:li></rdf:Alt></Iptc4xmpExt:AOTitle><Iptc4xmpExt:AOCreator><rdf:Seq><rdf:li>";
s+= Creator +"</rdf:li></rdf:Seq></Iptc4xmpExt:AOCreator></rdf:Description>";
s+="</rdf:li></rdf:Bag></Iptc4xmpExt:ArtworkOrObject></rdf:Description></rdf:RDF></x:xmpmeta>";
return s;
};
function locationShown(SubLoc,City,State,CountryName,CountryCode,WorldRegion){
if(SubLoc == undefined) SubLoc = ''; if(City == undefined) City = '';
if(State == undefined) State = ''; if(CountryName == undefined) CountryName = '';
if(CountryCode == undefined) CountryCode = ''; if(WorldRegion == undefined) WorldRegion = '';
var s ="<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27 \">"
s +="<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">";
s += "<rdf:Description rdf:about=\"\" xmlns:Iptc4xmpExt=\"http://iptc.org/std/Iptc4xmpExt/2008-02-29/\">";
s +="<Iptc4xmpExt:LocationShown><rdf:Bag><rdf:li rdf:parseType=\"Resource\">";
s +="<Iptc4xmpExt:Sublocation>" +SubLoc +"</Iptc4xmpExt:Sublocation>";
s +="<Iptc4xmpExt:City>"+City +"</Iptc4xmpExt:City>";
s +="<Iptc4xmpExt:ProvinceState>"+ State +"</Iptc4xmpExt:ProvinceState>";
s +="<Iptc4xmpExt:CountryName>" + CountryName + "</Iptc4xmpExt:CountryName>";
s +="<Iptc4xmpExt:CountryCode>" + CountryCode + "</Iptc4xmpExt:CountryCode>";
s +="<Iptc4xmpExt:WorldRegion>" + WorldRegion + "</Iptc4xmpExt:WorldRegion>";
s +="</rdf:li></rdf:Bag></Iptc4xmpExt:LocationShown></rdf:Description></rdf:RDF></x:xmpmeta>";
return s;
};
function locationCreated(SubLoc,City,State,CountryName,CountryCode,WorldRegion){
if(SubLoc == undefined) SubLoc = ''; if(City == undefined) City = '';
if(State == undefined) State = ''; if(CountryName == undefined) CountryName = '';
if(CountryCode == undefined) CountryCode = ''; if(WorldRegion == undefined) WorldRegion = '';
var s ="<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27 \">"
s +="<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">";
s += "<rdf:Description rdf:about=\"\" xmlns:Iptc4xmpExt=\"http://iptc.org/std/Iptc4xmpExt/2008-02-29/\">";
s +="<Iptc4xmpExt:LocationCreated><rdf:Bag><rdf:li rdf:parseType=\"Resource\">";
s +="<Iptc4xmpExt:Sublocation>" +SubLoc +"</Iptc4xmpExt:Sublocation>";
s +="<Iptc4xmpExt:City>"+City +"</Iptc4xmpExt:City>";
s +="<Iptc4xmpExt:ProvinceState>"+ State +"</Iptc4xmpExt:ProvinceState>";
s +="<Iptc4xmpExt:CountryName>" + CountryName + "</Iptc4xmpExt:CountryName>";
s +="<Iptc4xmpExt:CountryCode>" + CountryCode + "</Iptc4xmpExt:CountryCode>";
s +="<Iptc4xmpExt:WorldRegion>" + WorldRegion + "</Iptc4xmpExt:WorldRegion>";
s +="</rdf:li></rdf:Bag></Iptc4xmpExt:LocationCreated></rdf:Description></rdf:RDF></x:xmpmeta>";
return s;
};
Copy link to clipboard
Copied
Thank you SuperMerlin, I need it for Photoshop .
Copy link to clipboard
Copied
/* | |
Example on how to populate IPTC Extension in Photoshop | |
*/ |
#target photoshop;
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
xmp = new XMPMeta( app.activeDocument.xmpMetadata.rawData );
xmp.appendArrayItem( "http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:PersonInImage","Person Shown",0,XMPConst.PROP_IS_ARRAY);
xmp.setProperty("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:AddlModelInfo","Additional model info");
//xmp.deleteProperty( "http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:ModelAge");
xmp.appendArrayItem( "http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:ModelAge","75",0,XMPConst.PROP_IS_ARRAY);
//Model Age
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-UNK"); //Unknown age
/*
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-A25"); //25 or Older
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-A24"); //24
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-A23"); //23
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-A22"); //22
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-A21"); //21
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-A20"); //20
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-A19"); //19
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-A18"); //18
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-A17"); //17
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-A16"); //16
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-A15"); //15
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:MinorModelAgeDisclosure","http://ns.useplus.org/ldf/vocab/AG-U14"); //14 or Under
*/
//Model Release Status
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "ModelReleaseStatus","http://ns.useplus.org/ldf/vocab/MR-NON"); //None
/*
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "ModelReleaseStatus","http://ns.useplus.org/ldf/vocab/MR-NAP"); //Not Applicable
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "ModelReleaseStatus","http://ns.useplus.org/ldf/vocab/MR-UMR"); //Unlimited Model Releases
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "ModelReleaseStatus","http://ns.useplus.org/ldf/vocab/MR-LMR"); //Limited or Incomplete Model
*/
//Model Release Identifier
xmp.appendArrayItem("http://ns.useplus.org/ldf/xmp/1.0/", "plus:ModelReleaseID","Model Release Identifier",0,XMPConst.PROP_IS_ARRAY);
//Image Supplier
if(!xmp.doesPropertyExist("http://ns.useplus.org/ldf/xmp/1.0/","plus:ImageSupplier")){
XMPUtils.appendProperties(new XMPMeta(imageSupplier()), xmp, XMPConst.APPEND_ALL_PROPERTIES); | |
} |
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "plus:ImageSupplier[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:ImageSupplierName", "Supplier Name",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "plus:ImageSupplier[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:ImageSupplierID", "Supplier ID",0 );
//Suppliers Image ID
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:ImageSupplierImageID", "Suppliers Image ID" );
//Registry Entry
if(!xmp.doesPropertyExist("http://iptc.org/std/Iptc4xmpExt/2008-02-29/","Iptc4xmpExt:RegistryId")){
XMPUtils.appendProperties(new XMPMeta(registryId()), xmp, XMPConst.APPEND_ALL_PROPERTIES);
} |
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "RegistryId[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:RegOrgId", "Registry id.",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "RegistryId[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:RegItemId", "Registry item.",0 );
//Max Available Width/Height
xmp.setProperty("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:MaxAvailWidth", "3000" );
xmp.setProperty("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:MaxAvailHeight", "6000" );
//Digital Source Type
xmp.setProperty("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:DigitalSourceType", "http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture" );
/*
//Digitised from a negative film
xmp.setProperty("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:DigitalSourceType", "http://cv.iptc.org/newscodes/digitalsourcetype/negativeFilm" );
//Digitised from a positive film
xmp.setProperty("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:DigitalSourceType", "http://cv.iptc.org/newscodes/digitalsourcetype/dpositiveFilm" );
//Digitised from a print on non-transparent medium
xmp.setProperty("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:DigitalSourceType", "http://cv.iptc.org/newscodes/digitalsourcetype/print" );
//Created by software
xmp.setProperty("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:DigitalSourceType", "http://cv.iptc.org/newscodes/digitalsourcetype/softwareImage" );
*/
//Image Creator
if(!xmp.doesPropertyExist("http://ns.useplus.org/ldf/xmp/1.0/","plus:ImageCreator")){
XMPUtils.appendProperties(new XMPMeta(imageCreator()), xmp, XMPConst.APPEND_ALL_PROPERTIES); | |
} |
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "ImageCreator[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:ImageCreatorName", "My Name.",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "ImageCreator[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:ImageCreatorID", "My ID.",0 );
//Copyright owner
if(!xmp.doesPropertyExist("http://ns.useplus.org/ldf/xmp/1.0/","plus:CopyrightOwner")){
XMPUtils.appendProperties(new XMPMeta(copyOwner()), xmp, XMPConst.APPEND_ALL_PROPERTIES); | |
} |
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "CopyrightOwner[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:CopyrightOwnerName", "Copy Name.",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "CopyrightOwner[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:CopyrightOwnerID", "Copy ID.",0 );
//Licensor
if(!xmp.doesPropertyExist("http://ns.useplus.org/ldf/xmp/1.0/","plus:Licensor")){
XMPUtils.appendProperties(new XMPMeta(licensor()), xmp, XMPConst.APPEND_ALL_PROPERTIES); | |
} |
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorName", "L Name.",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorID", "L ID.",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorCity", "Leeds",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorStreetAddress", "address details",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorExtendedAddress", "Extended address details",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorRegion", "Reg/State",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorPostalCode", "LS13PP",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorCountry", "England",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephoneType1", "http://ns.useplus.org/ldf/vocab/work",0 );
/*
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephoneType1", "http://ns.useplus.org/ldf/vocab/cell",0);
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephoneType1", "http://ns.useplus.org/ldf/vocab/fax",0);
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephoneType1", "http://ns.useplus.org/ldf/vocab/home",0);
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephoneType1", "http://ns.useplus.org/ldf/vocab/pager",0);
*/
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephone1", "111111111",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephoneType2", "http://ns.useplus.org/ldf/vocab/work",0 );
/*
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephoneType2", "http://ns.useplus.org/ldf/vocab/cell",0);
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephoneType2", "http://ns.useplus.org/ldf/vocab/fax",0);
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephoneType2", "http://ns.useplus.org/ldf/vocab/home",0);
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephoneType2", "http://ns.useplus.org/ldf/vocab/pager",0);
*/
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorTelephone2", "22222222",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorEmail", "fred@work.co.uk",0 );
xmp.setStructField("http://ns.useplus.org/ldf/xmp/1.0/", "Licensor[1]","http://ns.useplus.org/ldf/xmp/1.0/", "plus:LicensorURL", "www.mysite.co.uk",0 );
//Property Release Status
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:PropertyReleaseStatus", "http://ns.useplus.org/ldf/vocab/PR-NON" ); //None
/*
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:PropertyReleaseStatus", "http://ns.useplus.org/ldf/vocab/PR-NAP" ); //Not Applicable
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:PropertyReleaseStatus", "http://ns.useplus.org/ldf/vocab/PR-UPR" ); //Unlimited Property Release
xmp.setProperty("http://ns.useplus.org/ldf/xmp/1.0/", "plus:PropertyReleaseStatus", "http://ns.useplus.org/ldf/vocab/PR-LPR" ); //Limited or Incomplete Property Relases
*/
//Property Release Ident
xmp.deleteProperty( "http://ns.useplus.org/ldf/xmp/1.0/", "plus:PropertyReleaseID");
xmp.appendArrayItem("http://ns.useplus.org/ldf/xmp/1.0/", "plus:PropertyReleaseID","Property Release Ident",0,XMPConst.PROP_IS_ARRAY);
/////////////////////////////
if(!xmp.doesPropertyExist("http://iptc.org/std/Iptc4xmpExt/2008-02-29/","LocationShown")){
XMPUtils.appendProperties(new XMPMeta(locationShown()), xmp, XMPConst.APPEND_ALL_PROPERTIES);
//xmp.deleteStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationShown[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:Sublocation");
}
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationShown[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:Sublocation", "Sub loc.",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationShown[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:City", "Funny Town",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationShown[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:ProvinceState", "State",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationShown[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:CountryName", "England",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationShown[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:CountryCode", "Iso code",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationShown[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:WorldRegion", "World Reg.",0 );
////////////////////////////////
if(!xmp.doesPropertyExist("http://iptc.org/std/Iptc4xmpExt/2008-02-29/","LocationCreated")){
XMPUtils.appendProperties(new XMPMeta(locationCreated()), xmp, XMPConst.APPEND_ALL_PROPERTIES);
}
//xmp.deleteStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationCreated[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:Sublocation");
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationCreated[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:Sublocation", "Sub loc.",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationCreated[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:City", "Funny Town",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationCreated[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:ProvinceState", "State",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationCreated[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:CountryName", "England",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationCreated[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:CountryCode", "Iso code",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "LocationCreated[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:WorldRegion", "World Reg.",0 );
/////////////////////////////////
if(!xmp.doesPropertyExist("http://iptc.org/std/Iptc4xmpExt/2008-02-29/","ArtworkOrObject")){
XMPUtils.appendProperties(new XMPMeta( ArtworkOrObject()), xmp, XMPConst.APPEND_ALL_PROPERTIES);
}
xmp.setLocalizedText( "http://iptc.org/std/Iptc4xmpExt/2008-02-29/","Iptc4xmpExt:ArtworkOrObject[1]/Iptc4xmpExt:AOTitle", null, "x-default", "Hello World" );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "ArtworkOrObject[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:AODateCreated", new XMPDateTime(new Date()) ,0 );
xmp.appendArrayItem("http://iptc.org/std/Iptc4xmpExt/2008-02-29/","Iptc4xmpExt:ArtworkOrObject[1]/Iptc4xmpExt:AOCreator","Geoff Merlin",0,XMPConst.ARRAY_IS_ORDERED );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "ArtworkOrObject[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:AOSource", "In the Depths of FIRE",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "ArtworkOrObject[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:AOSourceInvNo", "987654321",0 );
xmp.setStructField("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "ArtworkOrObject[1]","http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:AOCopyrightNotice", "Hands Off!",0 );
//////////////////////////////////
//xmp.deleteProperty( "http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:OrganisationInImageName");
xmp.appendArrayItem( "http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:OrganisationInImageName","Org Name",0,XMPConst.PROP_IS_ARRAY);
xmp.appendArrayItem( "http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:OrganisationInImageCode","Org code",0,XMPConst.PROP_IS_ARRAY);
xmp.setLocalizedText( "http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:Event", null, "x-default", "Event" );
//$.writeln( xmp.dumpObject() );
app.activeDocument.xmpMetadata.rawData = xmp.serialize();
//Create Structures
function locationCreated(){
var s ="<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27 | \">" |
s +="<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">";
s += "<rdf:Description rdf:about=\"\" xmlns:Iptc4xmpExt=\"http://iptc.org/std/Iptc4xmpExt/2008-02-29/\">";
s +="<Iptc4xmpExt:LocationCreated><rdf:Bag><rdf:li rdf:parseType=\"Resource\">";
s +="<Iptc4xmpExt:Sublocation>fred</Iptc4xmpExt:Sublocation>";
s +="</rdf:li></rdf:Bag></Iptc4xmpExt:LocationCreated></rdf:Description></rdf:RDF></x:xmpmeta>";
return s;
};
function ArtworkOrObject(){
var s ="<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c148 79.163820, 2019/02/20-18:54:02 | \">"; |
s+="<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">";
s+="<rdf:Description rdf:about=\"\" xmlns:Iptc4xmpExt=\"http://iptc.org/std/Iptc4xmpExt/2008-02-29/\">";
s+="<Iptc4xmpExt:ArtworkOrObject><rdf:Bag><rdf:li Iptc4xmpExt:AODateCreated=\""+ new XMPDateTime(new Date()) +"\"/>";
s+="</rdf:Bag></Iptc4xmpExt:ArtworkOrObject></rdf:Description></rdf:RDF></x:xmpmeta>";
return s;
};
function locationShown(){
var s ="<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27 | \">" |
s +="<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">";
s += "<rdf:Description rdf:about=\"\" xmlns:Iptc4xmpExt=\"http://iptc.org/std/Iptc4xmpExt/2008-02-29/\">";
s +="<Iptc4xmpExt:LocationShown><rdf:Bag><rdf:li rdf:parseType=\"Resource\">";
s +="<Iptc4xmpExt:Sublocation>del me</Iptc4xmpExt:Sublocation>";
s +="</rdf:li></rdf:Bag></Iptc4xmpExt:LocationShown></rdf:Description></rdf:RDF></x:xmpmeta>";
return s;
};
function imageSupplier(){
var s ="<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c148 79.163820, 2019/02/20-18:54:02 | \">"; |
s+= "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\"";
s+= " | xmlns:plus=\"http://ns.useplus.org/ldf/xmp/1.0/\"><plus:ImageSupplier><rdf:Seq><rdf:li"; |
s+= " | plus:ImageSupplierName=\"ISN\"/></rdf:Seq></plus:ImageSupplier></rdf:Description></rdf:RDF></x:xmpmeta>"; |
return s;
};
function registryId(){
var s ="<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c148 79.163820, 2019/02/20-18:54:02 | \">"; |
s+= "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\"";
s+=" xmlns:Iptc4xmpExt=\"http://iptc.org/std/Iptc4xmpExt/2008-02-29/\"><Iptc4xmpExt:RegistryId><rdf:Bag><rdf:li ";
s+=" Iptc4xmpExt:RegOrgId=\"ID\"/></rdf:Bag></Iptc4xmpExt:RegistryId></rdf:Description></rdf:RDF></x:xmpmeta>";
return s;
};
function imageCreator(){
var s ="<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c148 79.163820, 2019/02/20-18:54:02 | \">"; |
s+= "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\"";
s+=" | xmlns:plus=\"http://ns.useplus.org/ldf/xmp/1.0/\"><plus:ImageCreator><rdf:Seq><rdf:li"; |
s+=" | plus:ImageCreatorName=\"Name\"/></rdf:Seq></plus:ImageCreator></rdf:Description></rdf:RDF></x:xmpmeta>"; |
return s;
};
function copyOwner(){
var s ="<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c148 79.163820, 2019/02/20-18:54:02 | \">"; |
s+= "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\"";
s+=" | xmlns:plus=\"http://ns.useplus.org/ldf/xmp/1.0/\"><plus:CopyrightOwner><rdf:Seq><rdf:li"; |
s+=" | plus:ImageCreatorName=\"Name\"/></rdf:Seq></plus:CopyrightOwner></rdf:Description></rdf:RDF></x:xmpmeta>"; |
return s;
};
function licensor(){
var s ="<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c148 79.163820, 2019/02/20-18:54:02 | \">"; |
s+= "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\"";
s+=" | xmlns:plus=\"http://ns.useplus.org/ldf/xmp/1.0/\"><plus:Licensor><rdf:Seq><rdf:li"; |
s+=" | plus:ImageCreatorName=\"Name\"/></rdf:Seq></plus:Licensor></rdf:Description></rdf:RDF></x:xmpmeta>"; |
return s;
};
Copy link to clipboard
Copied
Thanks SuperMerlin​
Copy link to clipboard
Copied
Sorry I have a typo:-
xmp.setProperty("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:DigitalSourceType", "http://cv.iptc.org/newscodes/digitalsourcetype/dpositiveFilm" );
should be :-
xmp.setProperty("http://iptc.org/std/Iptc4xmpExt/2008-02-29/", "Iptc4xmpExt:DigitalSourceType", "http://cv.iptc.org/newscodes/digitalsourcetype/positiveFilm" );
Copy link to clipboard
Copied
Not sure if this is what you are looking for nor not… Paul Riggott Bridge scripted a method to dump common namespaces and to also dump other XMP from a file:
AEScart: => http://ns.adobe.com/aes/cart/
DICOM: => http://ns.adobe.com/DICOM/
Iptc4xmpCore: => http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/
Iptc4xmpExt: => http://iptc.org/std/Iptc4xmpExt/2008-02-29/
TEST: => http://ns.adobe.com/TEST/
adobe: => http://ns.adobe.com/xmp/aggregate/1.0/
album: => http://ns.adobe.com/album/1.0/
as11c: => http://amwa.tv/mxf/as/11/core/
as11s: => http://ns.adobe.com/mxf/as/11/structural/
as11u: => http://amwa.tv/mxf/as/11/ukdpp/
asf: => http://ns.adobe.com/asf/1.0/
aux: => http://ns.adobe.com/exif/1.0/aux/
bext: => http://ns.adobe.com/bwf/bext/1.0/
bmsp: => http://ns.adobe.com/StockPhoto/1.0/
cq: => http://www.day.com/jcr/cq/1.0
creatorAtom: => http://ns.adobe.com/creatorAtom/1.0/
crs: => http://ns.adobe.com/camera-raw-settings/1.0/
custom_date: => http://ns.custom_date.com/custom_date/
dam: => http://www.day.com/dam/1.0
dc: => http://purl.org/dc/elements/1.1/
exif: => http://ns.adobe.com/exif/1.0/
exifEX: => http://cipa.jp/exif/1.0/
iX: => http://ns.adobe.com/iX/1.0/
iXML: => http://ns.adobe.com/ixml/1.0/
jp2k: => http://ns.adobe.com/jp2k/1.0/
jpeg: => http://ns.adobe.com/jpeg/1.0/
lr: => http://ns.adobe.com/lightroom/1.0/
pdf: => http://ns.adobe.com/pdf/1.3/
pdfaExtension: => http://www.aiim.org/pdfa/ns/extension/
pdfaField: => http://www.aiim.org/pdfa/ns/field#
pdfaProperty: => http://www.aiim.org/pdfa/ns/property#
pdfaSchema: => http://www.aiim.org/pdfa/ns/schema#
pdfaType: => http://www.aiim.org/pdfa/ns/type#
pdfaid: => http://www.aiim.org/pdfa/ns/id/
pdfe: => http://www.aiim.org/pdfe/ns/id/
pdfx: => http://ns.adobe.com/pdfx/1.3/
pdfxid: => http://www.npes.org/pdfx/ns/id/
photoshop: => http://ns.adobe.com/photoshop/1.0/
plus: => http://ns.useplus.org/ldf/xmp/1.0/
png: => http://ns.adobe.com/png/1.0/
rdf: => http://www.w3.org/1999/02/22-rdf-syntax-ns#
riffinfo: => http://ns.adobe.com/riff/info/
stCamera: => http://ns.adobe.com/photoshop/1.0/camera-profile
stDim: => http://ns.adobe.com/xap/1.0/sType/Dimensions#
stEvt: => http://ns.adobe.com/xap/1.0/sType/ResourceEvent#
stFnt: => http://ns.adobe.com/xap/1.0/sType/Font#
stJob: => http://ns.adobe.com/xap/1.0/sType/Job#
stMfs: => http://ns.adobe.com/xap/1.0/sType/ManifestItem#
stRef: => http://ns.adobe.com/xap/1.0/sType/ResourceRef#
stVer: => http://ns.adobe.com/xap/1.0/sType/Version#
swf: => http://ns.adobe.com/swf/1.0/
tiff: => http://ns.adobe.com/tiff/1.0/
wav: => http://ns.adobe.com/xmp/wav/1.0/
x: => adobe:ns:meta/
xapG: => http://ns.adobe.com/xap/1.0/g
xml: => http://www.w3.org/XML/1998/namespace
xmp: => http://ns.adobe.com/xap/1.0/
xmpBJ: => http://ns.adobe.com/xap/1.0/bj/
xmpCA: => http://ns.adobe.com/xmp/1.0/ContentAnalysis/
xmpDM: => http://ns.adobe.com/xmp/1.0/DynamicMedia/
xmpG: => http://ns.adobe.com/xap/1.0/g/
xmpGImg: => http://ns.adobe.com/xap/1.0/g/img/
xmpMM: => http://ns.adobe.com/xap/1.0/mm/
xmpNote: => http://ns.adobe.com/xmp/note/
xmpPMAssign: => http://xmlns.sony.net/pro/metadata/planningmetadata/assignment/
xmpPMMemo: => http://xmlns.sony.net/pro/metadata/planningmetadata/memo/
xmpRights: => http://ns.adobe.com/xap/1.0/rights/
xmpScript: => http://ns.adobe.com/xmp/1.0/Script/
xmpT: => http://ns.adobe.com/xap/1.0/t/
xmpTPg: => http://ns.adobe.com/xap/1.0/t/pg/
xmpidq: => http://ns.adobe.com/xmp/Identifier/qual/1.0/
EDIT: Here is a dump of most of the IPTC:Extension fields, I named the entries after the GUI label in Bridge CC2018, some are repeated multiple times –
Iptc4xmpExt: http://iptc.org/std/Iptc4xmpExt/2008-02-29/ (0x80000000 : schema)
Iptc4xmpExt:AddlModelInfo = "Additional Model Info"
Iptc4xmpExt:DigitalSourceType = "http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture"
Iptc4xmpExt:PersonInImage (0x200 : isArray)
[1] = "Person Shown"
Iptc4xmpExt:LocationCreated (0x200 : isArray)
[1] (0x100 : isStruct)
Iptc4xmpExt:Sublocation = "Sublocation"
Iptc4xmpExt:City = "City"
Iptc4xmpExt:ProvinceState = "Province/State"
Iptc4xmpExt:CountryName = "Country Name"
Iptc4xmpExt:CountryCode = "Country ISO-Code"
Iptc4xmpExt:WorldRegion = "World Region"
Iptc4xmpExt:LocationShown (0x200 : isArray)
[1] (0x100 : isStruct)
Iptc4xmpExt:Sublocation = "Sublocation"
Iptc4xmpExt:City = "City"
Iptc4xmpExt:ProvinceState = "Province/State"
Iptc4xmpExt:CountryName = "Country Name"
Iptc4xmpExt:CountryCode = "Country ISO_Code"
Iptc4xmpExt:WorldRegion = "World Region"
Iptc4xmpExt:OrganisationInImageName (0x200 : isArray)
[1] = "Name of Featured Organisation"
Iptc4xmpExt:OrganisationInImageCode (0x200 : isArray)
[1] = "Code of Featured Organisation"
Iptc4xmpExt:Event (0x1E00 : isLangAlt isAlt isOrdered isArray)
[1] = "Event" (0x50 : hasLang hasQual)
? xml:lang = "x-default" (0x20 : isQual)
Iptc4xmpExt:ArtworkOrObject (0x200 : isArray)
[1] (0x100 : isStruct)
Iptc4xmpExt:AOSource = "Source"
Iptc4xmpExt:AOSourceInvNo = "Source Inventory Number"
Iptc4xmpExt:AOCopyrightNotice = "Copyright Notice"
Iptc4xmpExt:AOTitle (0x1E00 : isLangAlt isAlt isOrdered isArray)
[1] = "Title" (0x50 : hasLang hasQual)
? xml:lang = "x-default" (0x20 : isQual)
Iptc4xmpExt:AOCreator (0x600 : isOrdered isArray)
[1] = "Creator"
Iptc4xmpExt:ModelAge (0x200 : isArray)
[1] = "Model Age 1"
[2] = "Model Age 2"
Iptc4xmpExt:RegistryId (0x200 : isArray)
[1] (0x100 : isStruct)
Iptc4xmpExt:RegOrgId = "Organisation Identifier"
Iptc4xmpExt:RegItemId = "Item Identifier"
plus: http://ns.useplus.org/ldf/xmp/1.0/ (0x80000000 : schema)
plus:MinorModelAgeDisclosure = "http://ns.useplus.org/ldf/vocab/AG-A25"
plus:ModelReleaseStatus = "http://ns.useplus.org/ldf/vocab/MR-UMR"
plus:ImageSupplierImageID = "Supplier's Image ID"
plus:PropertyReleaseStatus = "http://ns.useplus.org/ldf/vocab/PR-UPR"
plus:ModelReleaseID (0x200 : isArray)
[1] = "Model Release Identifier"
plus:ImageSupplier (0x600 : isOrdered isArray)
[1] (0x100 : isStruct)
plus:ImageSupplierName = "Image Supplier Name"
plus:ImageSupplierID = "Image Supplier ID"
plus:ImageCreator (0x600 : isOrdered isArray)
[1] (0x100 : isStruct)
plus:ImageCreatorName = "Name"
plus:ImageCreatorID = "Identifier"
plus:CopyrightOwner (0x600 : isOrdered isArray)
[1] (0x100 : isStruct)
plus:CopyrightOwnerName = "Name"
plus:CopyrightOwnerID = "Identifier"
plus:Licensor (0x600 : isOrdered isArray)
[1] (0x100 : isStruct)
plus:LicensorName = "Name"
plus:LicensorID = "Identifier"
plus:PropertyReleaseID (0x200 : isArray)
[1] = "Property Release Identifier"
And here is a dump from the same file via ExifTool:
[XMP-iptcExt] AdditionalModelInformation : Additional Model Info
[XMP-iptcExt] DigitalSourceType : http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture
[XMP-iptcExt] PersonInImage : Person Shown
[XMP-iptcExt] LocationCreatedSublocation : Sublocation
[XMP-iptcExt] LocationCreatedCity : City
[XMP-iptcExt] LocationCreatedProvinceState : Province/State
[XMP-iptcExt] LocationCreatedCountryName : Country Name
[XMP-iptcExt] LocationCreatedCountryCode : Country ISO-Code
[XMP-iptcExt] LocationCreatedWorldRegion : World Region
[XMP-iptcExt] LocationShownSublocation : Sublocation
[XMP-iptcExt] LocationShownCity : City
[XMP-iptcExt] LocationShownProvinceState : Province/State
[XMP-iptcExt] LocationShownCountryName : Country Name
[XMP-iptcExt] LocationShownCountryCode : Country ISO_Code
[XMP-iptcExt] LocationShownWorldRegion : World Region
[XMP-iptcExt] OrganisationInImageName : Name of Featured Organisation
[XMP-iptcExt] OrganisationInImageCode : Code of Featured Organisation
[XMP-iptcExt] Event : Event
[XMP-iptcExt] ArtworkSource : Source
[XMP-iptcExt] ArtworkSourceInventoryNo : Source Inventory Number
[XMP-iptcExt] ArtworkCopyrightNotice : Copyright Notice
[XMP-iptcExt] ArtworkTitle : Title
[XMP-iptcExt] ArtworkCreator : Creator
[XMP-iptcExt] ModelAge : Model Age 1, Model Age 2
[XMP-iptcExt] RegistryOrganisationID : Organisation Identifier
[XMP-iptcExt] RegistryItemID : Item Identifier
[XMP-plus] MinorModelAgeDisclosure : Age 25 or Over
[XMP-plus] ModelReleaseStatus : Unlimited Model Releases
[XMP-plus] ImageSupplierImageID : Supplier's Image ID
[XMP-plus] PropertyReleaseStatus : Unlimited Property Releases
[XMP-plus] ModelReleaseID : Model Release Identifier
[XMP-plus] ImageSupplierName : Image Supplier Name
[XMP-plus] ImageSupplierID : Image Supplier ID
[XMP-plus] ImageCreatorName : Name
[XMP-plus] ImageCreatorID : Identifier
[XMP-plus] CopyrightOwnerName : Name
[XMP-plus] CopyrightOwnerID : Identifier
[XMP-plus] LicensorName : Name
[XMP-plus] LicensorID : Identifier
[XMP-plus] PropertyReleaseID : Property Release Identifier
Copy link to clipboard
Copied