Skip to main content
Participant
June 9, 2020
Answered

JSX > Camera Raw Filter > Transform. Possible?

  • June 9, 2020
  • 2 replies
  • 3786 views

Hi,

 

i need a jsx-script which applys the camera raw filter with the transform-settings

auto perspective, only horizontal lines, only ordinal lines and horizontal+ordinal lines.

But i cant find a documentation for the camera-raw filter anywhere.

I already found out how to auto whitebalance but i still need the 4 functions of changing the perspective.

 

Can someone help me please?
Thanks a lot


Regards

Kunterbunt

This topic has been closed for replies.
Correct answer Stephen Marsh

After some reverse engineering and testing, I have this thing:

 

 

/*
Camera Raw Filter - Transform Values:
1 = Auto, 2 = Full, 3 = Level, 4 = Vertical
*/
transformCRF( transValue = 1 );

function transformCRF() {
    var actDesc = new ActionDescriptor();
    var transCode = charIDToTypeID("PerU");
    actDesc.putInteger(transCode, transValue);
    executeAction(stringIDToTypeID("Adobe Camera Raw Filter"), actDesc, DialogModes.NO);
}

 

  

Enjoy!

2 replies

JJMack
Community Expert
Community Expert
June 9, 2020

you may be able to record an action to do that. I would have the action convert the layer you target to a smart object layer before applying an ACR Filter to the layer.

JJMack
Participant
June 9, 2020

Hi JJMack,

the problem is, if i record it as an action it always gets the same angle when i repeated it.

if i now apply a record on a new image it has not the same output as if i would do it like i do it with hands.

 

Regards

JJMack
Community Expert
Community Expert
June 11, 2020

In a script you would need to add something like an interactive process or some automated process to change the angle based on some criteria.  You can make an action steps like applying a filter interactive in a action so you can change the angle recorded into the step interactively.

JJMack
Stephen Marsh
Community Expert
Community Expert
June 9, 2020

Take a look at this topic thread:

 

 
I am not sure if the options you require are in there or not...
 
EDIT: After a quick test it appears that it may be possible to record this using ScriptingListener:
 
 
Participant
June 9, 2020

Hey, i already answered to JJMack:

JSX > Camera Raw Filter > Transform. Possible?

 

Thanks for your fast reply!

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
June 10, 2020

After some reverse engineering and testing, I have this thing:

 

 

/*
Camera Raw Filter - Transform Values:
1 = Auto, 2 = Full, 3 = Level, 4 = Vertical
*/
transformCRF( transValue = 1 );

function transformCRF() {
    var actDesc = new ActionDescriptor();
    var transCode = charIDToTypeID("PerU");
    actDesc.putInteger(transCode, transValue);
    executeAction(stringIDToTypeID("Adobe Camera Raw Filter"), actDesc, DialogModes.NO);
}

 

  

Enjoy!