Skip to main content
March 4, 2011
Question

Get values of adjustment layer

  • March 4, 2011
  • 1 reply
  • 5089 views

Is it possible, to get for example the brightness and the contrast of a brightness/contrast adjustment layer?

I found only for solid color layer.

This topic has been closed for replies.

1 reply

Inspiring
March 4, 2011

What version of Photoshop are you using. Adobe changed the way adustments are stored and it is much harder to deal with in newer version.

March 4, 2011

CS5

Inspiring
March 4, 2011

With CS4's new adjustment panel the adjustment is saved as raw data in the layer's descriptor. You can get that data with this code.

     var ref = new ActionReference();
     ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
     var desc = executeActionGet(ref).getList(stringIDToTypeID('adjustment')).getObjectValue(0);
     var rawData = desc.getData(stringIDToTypeID('legacyContentData'));

The problem then is understanding the raw data. I have worked that out for some adjustments but not brightness/contrast.

And maybe I (or my system) is having a bad day or Adobe has again changed the adjustment descriptor because none of the code I have including the code above works in ESTK with Photoshop CS5.