Skip to main content
Participant
April 24, 2013
Question

Is there a script to change a setting incrementally when batch processing in Camera Raw?

  • April 24, 2013
  • 1 reply
  • 944 views

I am editing a batch of about 1000 photos in Camera Raw. There are certain settings like contrast or clarity that will be the same for all of them. But with the Exposure, I would like to have it decrease incrementally from the first picture (set to +1.25) to the last picture (set to -2.00).

So for certain settings that will be the same on all images I have done a simple "select all" and "synchronize." But I am wondering if there is a script that will have Camera Raw (or any other Adobe program) automatically split the difference between an exposure of +1.25 to -2.00 and apply incremental values to the images?

Any thoughts?

This topic has been closed for replies.

1 reply

Paul Riggott
Inspiring
April 24, 2013

Copy and paste the script into ExtendScript Toolkit

This gets installed with Photoshop and can be found:-

PC: C:\Program Files\Adobe\Adobe Utilities

MAC: <hard drive>/Applications/Utilities/Adobe Utilities

Start Bridge

PC: Edit - Preferences - Startup Scripts

Mac: Adobe Bridge menu - Preferences - Startup Scripts

At the bottom click the "Reveal Button" this will open the folder where the script should be saved.

Close and restart Bridge.

Accept the new script.

To use:-

Navigate to the folder with your Raw files.

Tools - Set Average Exposures

Make sure you do a test first on a temp folder of the raw files!


#target bridge  

   if( BridgeTalk.appName == "bridge" ) { 

setExposure = MenuElement.create("command", "Set Average Exposures", "at the end of Tools","exp");

}

setExposure.onSelect = function () {

var d=app.document;

d.deselectAll();

var sels = d.getSelection("cr2,crw,nef,mos,orf");

var noOfFiles =sels.length;

var diff = (3.25 / (noOfFiles-1));

var exp = 1.25;

var exp2=exp;

for(var a = 0;a<noOfFiles;a++){

    exp2 = exp - (diff*(a)).toFixed(3);

    var file = new File(sels.spec.toString().replace(/\....$/,'.xmp'));

    setExposure( file, exp2 )

    }

app.document.chooseMenuItem('PurgeCache');

function setExposure( file, expose ){

     file.open('r');

     file.encoding = "UTF8";

     file.lineFeed = "unix";

     file.open("r", "TEXT", "????");

     var xmpStr = file.read();

     file.close();

     if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");

     var xmp = new XMPMeta( xmpStr );

     xmp.setProperty( XMPConst.NS_CAMERA_RAW, "Exposure", Number(expose) );

     file.open('w');

     file.encoding = "UTF8";

     file.lineFeed = "unix";

     file.write( xmp.serialize() );

     file.close();

    };

};

Participant
January 31, 2021

Good Evening @Paul Riggott ,

 

How can I use the same script for Lightroom ? I want to also increment the pics gradually. same as the OP but in Lightroom Classis 9.4.

Kukurykus
Legend
January 31, 2021

As far as I know there's no scripting for Lightroom.