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

Is there any jsx to execute the auto tone of camera raw ?

Explorer ,
Nov 06, 2018 Nov 06, 2018

Copy link to clipboard

Copied

I write some code to execute the auto tone of camera raw , but the image has no effects. I konw the Action Manager can't record the auto tone of camera raw,so i add the follow code :

desc1.putBoolean(charIDToTypeID('Auto'), true);

and  the auto function is still not work.Any help will be appreciated!

All code is as follows:

(function () {

  // Camera Raw Filter

    var desc1 = new ActionDescriptor();

    desc1.putString(charIDToTypeID('CMod'), "Filter");

    desc1.putEnumerated(charIDToTypeID('Sett'), charIDToTypeID('Sett'), charIDToTypeID('Cst '));

    desc1.putEnumerated(charIDToTypeID('WBal'), charIDToTypeID('WBal'), charIDToTypeID('AsSh'));

    desc1.putBoolean(charIDToTypeID('Auto'), true);

    desc1.putInteger(charIDToTypeID('Temp'), 0);

    desc1.putInteger(charIDToTypeID('Tint'), 0);

    desc1.putBoolean(charIDToTypeID('CtoG'), false);

    desc1.putInteger(charIDToTypeID('Strt'), 0);

    desc1.putInteger(charIDToTypeID('Shrp'), 0);

    desc1.putInteger(charIDToTypeID('LNR '), 0);

    desc1.putInteger(charIDToTypeID('CNR '), 0);

    desc1.putInteger(charIDToTypeID('VigA'), 0);

    desc1.putInteger(charIDToTypeID('BlkB'), 0);

    desc1.putInteger(charIDToTypeID('RHue'), 0);

    desc1.putInteger(charIDToTypeID('RSat'), 0);

    desc1.putInteger(charIDToTypeID('GHue'), 0);

    desc1.putInteger(charIDToTypeID('GSat'), 0);

    desc1.putInteger(charIDToTypeID('BHue'), 0);

    desc1.putInteger(charIDToTypeID('BSat'), 0);

    desc1.putInteger(charIDToTypeID('Vibr'), 0);

    desc1.putInteger(charIDToTypeID('HA_R'), 0);

    desc1.putInteger(charIDToTypeID('HA_O'), 0);

    desc1.putInteger(charIDToTypeID('HA_Y'), 0);

    desc1.putInteger(charIDToTypeID('HA_G'), 0);

    desc1.putInteger(charIDToTypeID('HA_A'), 0);

    desc1.putInteger(charIDToTypeID('HA_B'), 0);

    desc1.putInteger(charIDToTypeID('HA_P'), 0);

    desc1.putInteger(charIDToTypeID('HA_M'), 0);

    desc1.putInteger(charIDToTypeID('SA_R'), 0);

    desc1.putInteger(charIDToTypeID('SA_O'), 0);

    desc1.putInteger(charIDToTypeID('SA_Y'), 0);

    desc1.putInteger(charIDToTypeID('SA_G'), 0);

    desc1.putInteger(charIDToTypeID('SA_A'), 0);

    desc1.putInteger(charIDToTypeID('SA_B'), 0);

    desc1.putInteger(charIDToTypeID('SA_P'), 0);

    desc1.putInteger(charIDToTypeID('SA_M'), 0);

    desc1.putInteger(charIDToTypeID('LA_R'), 0);

    desc1.putInteger(charIDToTypeID('LA_O'), 0);

    desc1.putInteger(charIDToTypeID('LA_Y'), 0);

    desc1.putInteger(charIDToTypeID('LA_G'), 0);

    desc1.putInteger(charIDToTypeID('LA_A'), 0);

    desc1.putInteger(charIDToTypeID('LA_B'), 0);

    desc1.putInteger(charIDToTypeID('LA_P'), 0);

    desc1.putInteger(charIDToTypeID('LA_M'), 0);

    desc1.putInteger(charIDToTypeID('STSH'), 0);

    desc1.putInteger(charIDToTypeID('STSS'), 0);

    desc1.putInteger(charIDToTypeID('STHH'), 0);

    desc1.putInteger(charIDToTypeID('STHS'), 0);

    desc1.putInteger(charIDToTypeID('STB '), 0);

    desc1.putInteger(charIDToTypeID('PC_S'), 0);

    desc1.putInteger(charIDToTypeID('PC_D'), 0);

    desc1.putInteger(charIDToTypeID('PC_L'), 0);

    desc1.putInteger(charIDToTypeID('PC_H'), 0);

    desc1.putInteger(charIDToTypeID('PC_1'), 25);

    desc1.putInteger(charIDToTypeID('PC_2'), 50);

    desc1.putInteger(charIDToTypeID('PC_3'), 75);

    desc1.putDouble(charIDToTypeID('ShpR'), 1);

    desc1.putInteger(charIDToTypeID('ShpD'), 25);

    desc1.putInteger(charIDToTypeID('ShpM'), 0);

    desc1.putInteger(charIDToTypeID('PCVA'), 0);

    desc1.putInteger(charIDToTypeID('GRNA'), 0);

    desc1.putInteger(charIDToTypeID('LPEn'), 0);

    desc1.putInteger(charIDToTypeID('MDis'), 0);

    desc1.putInteger(charIDToTypeID('PerV'), 0);

    desc1.putInteger(charIDToTypeID('PerH'), 0);

    desc1.putDouble(charIDToTypeID('PerR'), 0);

    desc1.putInteger(charIDToTypeID('PerS'), 100);

    desc1.putInteger(charIDToTypeID('PerA'), 0);

    desc1.putInteger(charIDToTypeID('PerU'), 0);

    desc1.putDouble(charIDToTypeID('PerX'), 0);

    desc1.putDouble(charIDToTypeID('PerY'), 0);

    desc1.putInteger(charIDToTypeID('AuCA'), 0);

    desc1.putDouble(charIDToTypeID('Ex12'), 0);

    desc1.putInteger(charIDToTypeID('Cr12'), 0);

    desc1.putInteger(charIDToTypeID('Hi12'), 0);

    desc1.putInteger(charIDToTypeID('Sh12'), 0);

    desc1.putInteger(charIDToTypeID('Wh12'), 0);

    desc1.putInteger(charIDToTypeID('Bk12'), 0);

    desc1.putInteger(charIDToTypeID('Cl12'), 0);

    desc1.putInteger(charIDToTypeID('DfPA'), 0);

    desc1.putInteger(charIDToTypeID('DPHL'), 30);

    desc1.putInteger(charIDToTypeID('DPHH'), 70);

    desc1.putInteger(charIDToTypeID('DfGA'), 0);

    desc1.putInteger(charIDToTypeID('DPGL'), 40);

    desc1.putInteger(charIDToTypeID('DPGH'), 60);

    desc1.putInteger(charIDToTypeID('Dhze'), 0);

    desc1.putInteger(charIDToTypeID('TMMs'), 0);

    var list1 = new ActionList();

    list1.putInteger(0);

    list1.putInteger(0);

    list1.putInteger(255);

    list1.putInteger(255);

    desc1.putList(charIDToTypeID('Crv '), list1);

    var list2 = new ActionList();

    list2.putInteger(0);

    list2.putInteger(0);

    list2.putInteger(255);

    list2.putInteger(255);

    desc1.putList(charIDToTypeID('CrvR'), list2);

    var list3 = new ActionList();

    list3.putInteger(0);

    list3.putInteger(0);

    list3.putInteger(255);

    list3.putInteger(255);

    desc1.putList(charIDToTypeID('CrvG'), list3);

    var list4 = new ActionList();

    list4.putInteger(0);

    list4.putInteger(0);

    list4.putInteger(255);

    list4.putInteger(255);

    desc1.putList(charIDToTypeID('CrvB'), list4);

    desc1.putString(charIDToTypeID('CamP'), "Embedded");

    desc1.putString(charIDToTypeID('CP_D'), "54650A341B5B5CCAE8442D0B43A92BCE");

    desc1.putInteger(charIDToTypeID('PrVe'), 167772160);

    desc1.putString(charIDToTypeID('Rtch'), "");

    desc1.putString(charIDToTypeID('REye'), "");

    desc1.putString(charIDToTypeID('LCs '), "");

    desc1.putString(charIDToTypeID('Upri'), "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c140 79.160451, 2017/05/06-01:08:21        \">\n <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n  <rdf:Description rdf:about=\"\"\n    xmlns:crs=\"http://ns.adobe.com/camera-raw-settings/1.0/\"\n   crs:UprightVersion=\"151388160\"\n   crs:UprightCenterMode=\"0\"\n   crs:UprightCenterNormX=\"0.5\"\n   crs:UprightCenterNormY=\"0.5\"\n   crs:UprightFocalMode=\"0\"\n   crs:UprightFocalLength35mm=\"35\"\n   crs:UprightPreview=\"False\"\n   crs:UprightTransformCount=\"6\"/>\n </rdf:RDF>\n</x:xmpmeta>\n");

    desc1.putString(charIDToTypeID('GuUr'), "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c140 79.160451, 2017/05/06-01:08:21        \">\n <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n  <rdf:Description rdf:about=\"\"\n    xmlns:crs=\"http://ns.adobe.com/camera-raw-settings/1.0/\"\n   crs:UprightFourSegmentsCount=\"0\"/>\n </rdf:RDF>\n</x:xmpmeta>\n");

    desc1.putString(charIDToTypeID('Look'), "");

    desc1.putString(charIDToTypeID('Pset'), "");

    executeAction(stringIDToTypeID('Adobe Camera Raw Filter'), desc1, DialogModes.NO);

})();

TOPICS
Actions and scripting

Views

8.7K

Translate

Translate

Report

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

correct answers 2 Correct answers

People's Champ , Nov 06, 2018 Nov 06, 2018

Try

desc1.putBoolean(charIDToTypeID("AuTn"), true);

Votes

Translate

Translate
People's Champ , Oct 31, 2019 Oct 31, 2019

Votes

Translate

Translate
Adobe
Adobe Employee ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

Hi Martin,

Welcome to the Adobe Community!

 

As you want to record Camera Raw's Auto as an action, please have a look at a similar discussion here: Batch Process Camera RAW Auto Correct I think the correct answer is what you're looking for.

Let us know how it goes.
Regards,
Sahil

Votes

Translate

Translate

Report

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
Explorer ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

Thank Sahil.

The link that you gave on the response attempted to resolve similar issue.  But, it does not resolve the problem that I have.

(In fact, maybe due to version upgrade, it now does not require Adobe Bridge to call the job of running Scripts of Image Processor.  As described on my post, the File Menu of Photoshop has included the menu item of Scripts > Image Processor.)

 

The problem is stemmed from the recording of "Camera Raw Filter".

To illustrate, I have 500 pictures which are taken at different spots, in-door and outdoor, throughout an event.  As a result, some of them are a bit over exposure and some are slightly under exposure.  In a manual process of Photoshop, I would open these 50 pictures one by one and apply Camera Raw Filter > Auto to correct them.  For convinence sake, I would not manually do exposure and other adjustments one by one, but rely on the Auto function of Camera Raw Filter.  Yet, it still take me a lot of time.

So, I tried to record my action steps into the Actions scripts and apply these action steps to the 500 pictures.

 

When I recorded the Action

I opened the first picture (Modelling Picture) and record the actions.  Amongst the actions, I invoked the Camera Raw Filter and  click "Auto" (Yellow Arrow on diagram), i.e. leave it to Photoshop to do automated adjustment.

2.jpg

I finished the recording and saved it to Action 1.

 

Then I runned the Image Processor with Action 1, 

1.jpg

Photoshop then went through the scripts of Action 1 and applied them all on the 500 pictures.

The effect was not good.  I realized that the Action 1 recorded the fixed value of adjustments based on the Modelling Picture, as noted on the below diagram.

3.jpg

As I said, some of the 500 pictures should be adjust +EV and some others -EV, I wanted to apply Auto of Camera Raw Filter.  (I do not want because of the Modelling Picture required +EV then the rest pictures applied +EV.)  The required adjustments are not just exposure but other elements. 

Would there be a way to set such scripts up?

 

 

 

   

 
 

 

Votes

Translate

Translate

Report

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 ,
Mar 14, 2022 Mar 14, 2022

Copy link to clipboard

Copied

Many years later if anyone else comes across this it may be useful. This script I have been using to create a canvas actually installs the jsx as an action. To test I installed it fresh and edited the canvas.jsx it created and ran the script and it worked perfectly. You can run the script as an action through image processor. Someone more adept at coding could make this work specifically for this script. 

 

https://photoshop-plugin.com/Canvas.php

Votes

Translate

Translate

Report

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 Expert ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

I don't believe that this is possible.

 

You could look into third-party "macro" recording software which could possibly record and automate key presses and mouse movements.

 

As you are not working on a true raw image and are using the camera raw "filter" on rendered data, you may not be missing out on much (technically), except for convenience of "editing"... So I'd just look into "equivalent" traditional Photoshop commands that do similar (auto options found in levels or curves for example).

Votes

Translate

Translate

Report

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
People's Champ ,
Oct 31, 2019 Oct 31, 2019

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

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 Expert ,
Oct 31, 2019 Oct 31, 2019

Copy link to clipboard

Copied

As always, fantastic work r-bin!

 

 

Votes

Translate

Translate

Report

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