Skip to main content
Participant
September 1, 2025
Question

Scripting Help: How to modify an auto-generated Curves layer to have 16 points?

  • September 1, 2025
  • 1 reply
  • 126 views

Hi everyone, I'm trying to write an ES3-compatible JavaScript to automate a very specific workflow for a Curves adjustment layer. My goal is to achieve the following steps in a single script:

1. Create a new Curves adjustment layer.

2. Apply the "Auto Color" correction using the "Find Dark & Light Colors" algorithm.

3. Enable the "Snap Neutral Midtones" option.

4. Set the Shadow and Highlight clipping values to 0.01%.

5. **And the crucial part:** I want the resulting, auto-generated composite (RGB) curve to be defined by exactly 16 control points for maximum smoothness.

I've successfully written a script using the Action Manager that applies all the "Auto" settings (steps 1-4). This part works perfectly. **The problem is with the final step.** I don't know how to access the curve that Photoshop generates from the auto-correction, and then "resample" it to use 16 points. If I try to manually set 16 points after running the auto command, it simply overwrites the result of the auto-correction. My core question is: Is there a way to scriptmatically **read the point values** of the curve that the `auto: true` command generates, and then use those values to approximate and set a new curve with 16 points? Any guidance or pointers on how to approach this would be greatly appreciated!

Thank you in advance.

1 reply

creative explorer
Community Expert
Community Expert
September 5, 2025

@ja5E92 honestly, accessing and resampling the auto-generated curve in Photoshop's ES3 JavaScript is not directly possible. The "Auto Color Correction" is a built-in function that doesn't expose its generated curve points to the scripting environment

m