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

reading extraMetadata

New Here ,
Dec 14, 2005 Dec 14, 2005
I must to read Dimensions and others extraMetadata of images.
How I have to use "metadata" property of a thumbnail?

thanks

Ivan
TOPICS
Scripting
1.9K
Translate
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 Beginner ,
Dec 14, 2005 Dec 14, 2005
Ivan,

here's an example:

var md = app.document.selections[0].metadata;
md.namespace = "http://ns.adobe.com/tiff/1.0/"; // tiff namespace
var imageWidth = md.imageWidth;
var imageLength = md.imageLength;

if you're processing files in folders that have not been cached by bridge, you may need to use synchronousMetadata.

var md = app.document.selections[0].synchronousMetadata;

synchronousMetadata was a late addition that will get you a metadata object even while bridge is still building the cache.

Bob
Adobe Workflow Scripting
Translate
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 ,
Dec 14, 2005 Dec 14, 2005
I have tried your example but all I get is an empty string.
I have tried also with other kind of files, jpg, psd etc..

I think the problem is in "namespace".
Exactly what I have to specify for this property ?

I need "Bridge JavaScript Reference for dummies" :-(
Translate
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 Beginner ,
Dec 14, 2005 Dec 14, 2005
Ivan,

I don't know if you have AdobeLibrary3.jsx or not. You can get it by downloading the Import from Camera script on Adobe Exchange.

In it, I wrote an object to help with things like namespaces.

Here's an excerpt of that code that defined "namespace objects" that are used to get/set metadata

new MdNs.MetadataNamespace( "IPTC Core", "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "Iptc4xmpCore" );
new MdNs.MetadataNamespace( "EXIF", "http://ns.adobe.com/exif/1.0/", "exif");
new MdNs.MetadataNamespace( "Dublin Core", "http://purl.org/dc/elements/1.1/", "dc" );
new MdNs.MetadataNamespace( "TIFF", "http://ns.adobe.com/tiff/1.0/", "tiff" );
new MdNs.MetadataNamespace( "XMP Basic", "http://ns.adobe.com/xap/1.0/", "xmp" );
new MdNs.MetadataNamespace( "XMP Media Management", "http://ns.adobe.com/xap/1.0/mm/", "xmpMM" );
new MdNs.MetadataNamespace( "XMP Rights Management", "http://ns.adobe.com/xap/1.0/rights/", "xmpRights" );
new MdNs.MetadataNamespace( "XMP Basic Job Ticket", "http://ns.adobe.com/xap/1.0/bj/", "xmpBJ" );
new MdNs.MetadataNamespace( "XMP Paged-Text", "http://ns.adobe.com/xap/1.0/t/pg/", "xmpTPg" );
new MdNs.MetadataNamespace( "Photoshop", "http://ns.adobe.com/photoshop/1.0/", "photoshop" );
// new MdNs.MetadataNamespace( "Stock Photo", "http://ns.adobe.com/StockPhoto/1.0/", "bmsp" );
new MdNs.MetadataNamespace( "Adobe PDF", "http://ns.adobe.com/pdf/1.3/", "pdf" );
new MdNs.MetadataNamespace( "Camera Raw Settings", "http://ns.adobe.com/camera-raw-settings/1.0/", "crs" );
// new MdNs.MetadataNamespace( "PNG", "http://ns.adobe.com/png/1.0/", "png" );


This snippet shows all of the standard XMP namespaces that I was able to find.

Also look at the MdManager class for getting and setting metadata for a given thumbnail

Bob
Adobe Workflow Scripting
Translate
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 ,
Dec 14, 2005 Dec 14, 2005
Hi, this is really interesting. I want to modify Dr Browns caption script to add custom data that I have created in iView MediaPro (the people field). Currently, I can't get the captionMaker to read it (depsite using _mediapro:People_ as the metadata key. The meta data is in the xmp file (<rdf:Description rdf:about='' xmlns:mediapro='http://ns.iview-multimedia.com/mediapro/1.0/'><mediapro:People><rdf:Bag><rdf:li>Jo Mills</rdf:li></rdf:Bag></mediapro:People><mediapro:CatalogSets><rdf:Bag><rdf:li>&quot;Coaches&quot;</rdf:li></rdf:Bag></mediapro:CatalogSets></rdf:Description><br />). All I get outof the script is ? <rdf:Bag>?<br /><br />So do I need to add a New MdNS for mediapro, and also add elements that I need from that namespace, and then modify the caption maker script to extract those elements? And can I do this in the calling script, or should I modify your libraries? Just trying to get the plan of action straight before I dive into the code!<br /><br />regards<br /><br />Gareth Jones
Translate
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 Beginner ,
Dec 14, 2005 Dec 14, 2005
LATEST
Gareth,

You certainly could modify the libraries, but that's a lot of overhead for this simple task.

I built the library to make a general case metadata exporter and to provide a way for people to find out what metadata exists for a given image.

I'd probably just use

md.namespace = [media pro namespace]
md.People;

Bob
Translate
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