Copy link to clipboard
Copied
I can change the prefernces for resampling type
// =======================================================
var idsetd = charIDToTypeID( "setd" );
var desc1121 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref179 = new ActionReference();
var idPrpr = charIDToTypeID( "Prpr" );
var idGnrP = charIDToTypeID( "GnrP" );
ref179.putProperty( idPrpr, idGnrP );
var idcapp = charIDToTypeID( "capp" );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref179.putEnumerated( idcapp, idOrdn, idTrgt );
desc1121.putReference( idnull, ref179 );
var idT = charIDToTypeID( "T " );
var desc1122 = new ActionDescriptor();
var idIntM = charIDToTypeID( "IntM" );
var idIntp = charIDToTypeID( "Intp" );
var idNrst = charIDToTypeID( "Nrst" );
desc1122.putEnumerated( idIntM, idIntp, idNrst );
var iduseClassicFileNewDialog = stringIDToTypeID( "useClassicFileNewDialog" );
desc1122.putBoolean( iduseClassicFileNewDialog, true );
var idGnrP = charIDToTypeID( "GnrP" );
desc1121.putObject( idT, idGnrP, desc1122 );
executeAction( idsetd, desc1121, DialogModes.NO );
But that doesn't change the last used type of resample for Image Resize and or Transforms - which is what I'm trying to do.
Essentially
var currentResizemethod = ???
var newResizemethod = ResampleMethod.NEARESTNEIGHBOR;
Trying to force an image to resize doesn't seem to change that last human selection ofr the sample method.
Copy link to clipboard
Copied
Some operations have their own settings, which are remembered according to the last action performed by the user. The easiest way is to perform the desired operation once with the specified parameters (it's better not to do this on a working file, but to create a temporary one). Photoshop will later offer the specified parameters automatically.
Perhaps there is a way to manipulate similar parameters in a different way, but I do not know it.
Copy link to clipboard
Copied