Copy link to clipboard
Copied
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 !
1 Correct answer
app.document.chooseMenuItem('OpenInCameraRaw');
Copy link to clipboard
Copied
Camera RAW cannot be scripted. This is a common request to Adobe but so far they refuse to implement it.
Copy link to clipboard
Copied
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 ?
Copy link to clipboard
Copied
app.document.chooseMenuItem('OpenInCameraRaw');
Copy link to clipboard
Copied
@SuperMerlin thank you very much ! It works !
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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).
Copy link to clipboard
Copied
@SuperMerlin thank you very much for your answer !
Do you know if the metadata (original ones and xmp from Lightroom for example) can be applied to the image while exporting it with Adobe Bridge ?
In fact, i'd like to test different formats of input images : .jpg, .dng and .cr2.
Is it what you'd like to say in your message ?
Copy link to clipboard
Copied
Sorry I don't know anything about Lightroom, maybe Lumigrapics might have an answer.
Copy link to clipboard
Copied
If you have RAW files, you could script the creation of a sidecar I suppose. XMP sidecar files are plain text in XML format which Extendscript can handle.
Why not just use the existing batch processing features? That would be WAY easier.
Copy link to clipboard
Copied
Thanks @Lumigraphics !

