Get document Exif info

Does anyone know how to get an object containing the Exif info of the active document?
In ExtendScript this would have been “app.activeDocument.info.exif”

I’ve been playing with Alchemist and can get the “fileInfo” object but this only contains keywords and author information, nothing to do with the camera.

So far the only option has been to try and extract it from the raw XMP metadata but that comes with its own set of issues. Thanks for any help :slight_smile:

In case anyone finds it helpful here is how to get the fileInfo object:

var documentFileInfo = await getDocumentFileInfo();
console.log(documentFileInfo);

async function getDocumentFileInfo(){
    const result = await require("photoshop").action.batchPlay(
      [
         {
            "_obj": "get",
            "_target": [
               {
                  "_property": "fileInfo"
               },
               {
                  "_ref": "document",
                  "_enum": "ordinal",
                  "_value": "targetEnum"
               }
            ],
            "_options": {
               "dialogOptions": "dontDisplay"
            }
         }
      ],{
         "synchronousExecution": false,
         "modalBehavior": "fail"
      }); 
      return result;   
   }

You might want to try this:

// Get current opened doc EXIF (String)
var batchPlay = require("photoshop").action.batchPlay;

var get_EXIF = await batchPlay(
   [{
      "_obj": "get",
      "_target": [{
            "_property": "EXIF"
         },
         {
            "_ref": "document",
            "_enum": "ordinal",
            "_value": "targetEnum"
         }
      ]
   }], {});

var data = get_EXIF[0].EXIF;
console.log(data);

Hope this helps :slight_smile: