script set contrast value
hi,
i use the following code to create the brightness/contrast layer
Code:
// Apply auto brightness/contrast adjustment
var autoDescriptor = new ActionDescriptor();
var reference = new ActionReference();
reference.putClass(stringIDToTypeID("adjustmentLayer"));
autoDescriptor.putReference(stringIDToTypeID("null"), reference);
var typeDescriptor = new ActionDescriptor();
var brightnessDescriptor = new ActionDescriptor();
brightnessDescriptor.putBoolean(stringIDToTypeID("auto"), true);
brightnessDescriptor.putBoolean(stringIDToTypeID("useLegacy"), false);
typeDescriptor.putObject(stringIDToTypeID("type"), stringIDToTypeID("brightnessEvent"), brightnessDescriptor);
autoDescriptor.putObject(stringIDToTypeID("using"), stringIDToTypeID("adjustmentLayer"), typeDescriptor);
var resultDesc = executeAction(stringIDToTypeID("make"), autoDescriptor, DialogModes.NO);
///////////////////////
but the contrast value often makes the image too contrasty, i want to set the contrast value = 0,
please give me the command to do it.
