Skip to main content
Known Participant
December 9, 2020
Answered

Adobe Bridge scripting (javascript) and Camera Raw : jpg, dng, raw formats

  • December 9, 2020
  • 2 replies
  • 2645 views

Hello ! 

 

Do you know how to open an image with Camera Raw with Adobe Bridge javascript scripting ? 

 

I manage to :

- target Bridge application,

- get a list of all the .jpg images inside the folder "/Users/input_directory" (i'm using a Mac),

- select one image in the list (here the second image), 

- display the image in a new document

- select the thumbnail that corresponds to the file

The code is below : 

 

 

#target bridge-4.0;
var files = Folder("/Users/input_directory/").getFiles("*.jpg");
var file_test = files[2];

var doc = new Document(file_test); 
var selectedThumbnails = app.document.getSelection();
var thumb = selectedThumbnails[0];

 

 

Do you know how i can edit the image using Camera Raw by scripting, and then export it (in raw, dng or another format) ?

Documentation about Adobe Bridge can be downloaded here : https://console.adobe.io/downloads/br

In JavaScript SDK samples, there are 2 files : 

- SnpInspectMetadata.jsx

- SnpModifyMetadata.jsx

Does these files do the same thing than Camera Raw  ?

 

In Adobe Bridge 2021 JavaScript Reference.pdf, there is an option called OpenInCameraRaw but i don't know how to use it in the script. It is in the thumbnail part ?

 

Another documentation about XMP metadata is avalaible here : https://javascript-tools-guide.readthedocs.io/scripting-xmp/accessing-the-xmp-scripting-api.html

 

Thank you in advance !

This topic has been closed for replies.
Correct answer SuperMerlin

app.document.chooseMenuItem('OpenInCameraRaw');

2 replies

SuperMerlin
Inspiring
December 9, 2020

It's true Camera Raw is not scriptable, But

You might be able to do so in a limited way?

In folder :- var CameraRawfolder = Folder(Folder.userData + "/Adobe/CameraRaw/Defaults");

Contains the xmp defaults, one of these is called Previous.xmp

You could write a script to modify this file, select the thumbnails then apply "Develop Settings - Previous Conversion"

Then you would need the external DNG converter and script that to do your coversions.

It would be a lot simpler if Adobe made ACR scriptable

Good luck.

Legend
December 9, 2020

The OP also wants to start with JPEG files, which really aren't designed to use ACR as a primary editing method. It will work but you can't output RAW and there are limitations on converting JPEG to DNG.

Known Participant
December 10, 2020

Hi @Lumigraphics !

In fact, i was using jpg images for first tests to launch Bridge with scripting. The idea is that i'd be able to apply metadata to modify image appearance whatever the input format (raw, dng). 

Legend
December 9, 2020

Camera RAW cannot be scripted. This is a common request to Adobe but so far they refuse to implement it.

Known Participant
December 10, 2020

Hi @Lumigraphics ! Thanks for answering !

Even if Camera Raw is not scriptable, is it possible to call it under Adobe Bridge ? 

I mean, without scripting, under Adobe Bridge, if we select a thumbnail of an image, there is a button "Open in Camera Raw". Is it possible to call that with script ? 

 

Do you know if Camera Raw is automatically used when we export an input raw image in Adobe Bridge ? 

 

SuperMerlin
SuperMerlinCorrect answer
Inspiring
December 10, 2020

app.document.chooseMenuItem('OpenInCameraRaw');