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

[JS] How can I extract (or read) the credit and the source value from Metadata

Community Expert ,
Nov 24, 2016 Nov 24, 2016

Copy link to clipboard

Copied

Hi,

can someone help me please:

How can I extract (or read) the "Credit" and the "Source" value from Metadata in Bridge CC2015+ for all possible image file formats with Javascript?

(At the best without exiftool)

Any help would be greatly appreciated.

TOPICS
Scripting

Views

998

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

correct answers 1 Correct answer

Guide , Nov 25, 2016 Nov 25, 2016

Example to be run from Extendscript Toolkit.

#target bridge;

var thumbs = app.document.visibleThumbnails;

//file types to process

thumbs = app.document.getSelection("jpg,tif,gif,eps,psd,pcx,png,eps,crw,cr2,tiff,raw,rw2,dng,nef,orf,erf,mos,dcr,raf,srf,pef,x3f");

for(var a in thumbs){

var thumb = thumbs;

md = thumb.synchronousMetadata;

md.namespace =  "http://ns.adobe.com/photoshop/1.0/";

var filename = decodeURI(thumbs.name);

var Credit = md.Credit ? md.Credit : "" ;

var Source = md.Source ? md.Source : ""

...

Votes

Translate

Translate
Guide ,
Nov 25, 2016 Nov 25, 2016

Copy link to clipboard

Copied

Example to be run from Extendscript Toolkit.

#target bridge;

var thumbs = app.document.visibleThumbnails;

//file types to process

thumbs = app.document.getSelection("jpg,tif,gif,eps,psd,pcx,png,eps,crw,cr2,tiff,raw,rw2,dng,nef,orf,erf,mos,dcr,raf,srf,pef,x3f");

for(var a in thumbs){

var thumb = thumbs;

md = thumb.synchronousMetadata;

md.namespace =  "http://ns.adobe.com/photoshop/1.0/";

var filename = decodeURI(thumbs.name);

var Credit = md.Credit ? md.Credit : "" ;

var Source = md.Source ? md.Source : "" ;

$.writeln(filename + "," +Credit + "," + Source);

}

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
Community Expert ,
Nov 25, 2016 Nov 25, 2016

Copy link to clipboard

Copied

SuperMerlin

really does live up to its name!

Great. That's 9 out of a possible 10 points.

Thank you very much.

But unfortunately it does not work with *.bmp and *.pcx --> thumbs = app.document.getSelection("bmp,pcx");  //"undefined is not an object"

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
Community Expert ,
Nov 25, 2016 Nov 25, 2016

Copy link to clipboard

Copied

Do these file types support this metadata? The Bridge Metadata panel GUI would appear to suggest that this is not possible.

ExifTool has issues with BMP too. Using the following command:

exiftool -XMP-photoshop:Credit=ABC -XMP-photoshop:Source=123 '/Users/currentuser/Desktop/test.bmp'

Has the following error: “Error: Writing of BMP files is not yet supported, 0 image files updated, 1 files weren’t updated due to errors”

And as for PCX: “Error: Writing of this type of file is not supported, 0 image files updated, 1 files weren’t updated due to errors”

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
Guide ,
Nov 26, 2016 Nov 26, 2016

Copy link to clipboard

Copied

As Steven has said bmp and pcx are not supported for metadata in Bridge, if you try to use Info, it is not available. You won't need to check these file types as you now know there is nothing there

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
Community Expert ,
Nov 26, 2016 Nov 26, 2016

Copy link to clipboard

Copied

LATEST

Thank you both of you for the quick responses.

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